Monday, 9 January 2023

A failure occurred while executing com.android.build.gradle.tasks

Error in Kony visualizer V9 service pack 6 and FX11




 [2023-01-09 22:23:32.695] [DEBUG] ~~~~ - INFO [exec-shell] Execution failed for task ':packageDebug'. INFO [2023-01-09 22:23:32.696] [DEBUG] ~~~~ - INFO [exec-shell] > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable INFO [2023-01-09 22:23:32.697] [DEBUG] ~~~~ - INFO [exec-shell] > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\username\.android\debug.keystore": Invalid keystore format INFO [2023-01-09 22:23:32.698] [DEBUG] ~~~~ - INFO [exec-shell] INFO





Solutions : After Long time analized. from the C://users/username/.android/debug.keystore deleted and try again the clean-build the android Native application is working fine for me

Wednesday, 18 November 2020

google playservice issue in Kony visualizer V9




INFO [exec-shell] * What went wrong:
 INFO 
 INFO [exec-shell] Execution failed for task ':processDebugGoogleServices'.
[exec-shell] > File google-services.json is missing. The Google Services Plugin cannot function without it. 
[exec-shell]    Searched Location:
 INFO [exec-shell]   A:\Push\src\debug\google-services.json
[exec-shell]   A:\Push\google-services.json
[exec-shell]
 INFO [exec-shell] * Try:
[exec-shell] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 INFO [exec-shell] 
[exec-shell] * Get more help at https://help.gradle.org
[exec-shell] 
[exec-shell] BUILD FAILED in 28s

V9

ask :preBuild UP-TO-DATE
[exec-shell] > Task :preDebugBuild UP-TO-DATE
INFO [exec-shell] > Task :generateDebugBuildConfig UP-TO-DATE
INFO
INFO [exec-shell] > Task :javaPreCompileDebug UP-TO-DATE
INFO [exec-shell] > Task :compileDebugRenderscript UP-TO-DATE
INFO [exec-shell] > Task :compileDebugAidl NO-SOURCE
INFO [exec-shell] > Task :generateDebugResValues UP-TO-DATE
[exec-shell] > Task :generateDebugResources UP-TO-DATE
INFO [exec-shell]
INFO [exec-shell] > Task :processDebugGoogleServices
[exec-shell] Parsing json file: A:\SampleV9App\google-services.json
INFO [exec-shell]
INFO [exec-shell] > Task :mergeDebugResources UP-TO-DATE
INFO [exec-shell] > Task :createDebugCompatibleScreenManifests UP-TO-DATE
INFO [exec-shell] > Task :extractDeepLinksDebug UP-TO-DATE
INFO [exec-shell] > Task :processDebugManifest UP-TO-DATE
INFO [exec-shell] > Task :mergeDebugShaders UP-TO-DATE
INFO
INFO [exec-shell] > Task :compileDebugShaders NO-SOURCE
INFO
INFO [exec-shell] > Task :generateDebugAssets UP-TO-DATE
INFO
INFO [exec-shell] > Task :mergeDebugAssets
INFO [exec-shell] > Task :processDebugJavaRes UP-TO-DATE
INFO [exec-shell] > Task :mergeDebugJavaResource UP-TO-DATE
INFO [exec-shell] > Task :processDebugResources UP-TO-DATE
INFO
INFO [exec-shell] > Task :compileDebugJavaWithJavac UP-TO-DATE
INFO [exec-shell] > Task :compileDebugSources UP-TO-DATE
INFO [exec-shell] > Task :checkDebugDuplicateClasses UP-TO-DATE
INFO
INFO [exec-shell] > Task :mergeLibDexDebug UP-TO-DATE
INFO
INFO [exec-shell] > Task :dexBuilderDebug UP-TO-DATE
INFO
INFO [exec-shell] > Task :desugarDebugFileDependencies UP-TO-DATE
INFO [exec-shell] > Task :mergeProjectDexDebug UP-TO-DATE
INFO [exec-shell] > Task :mergeDebugJniLibFolders UP-TO-DATE
INFO [exec-shell] > Task :mergeDebugNativeLibs UP-TO-DATE
INFO [exec-shell] > Task :mergeExtDexDebug UP-TO-DATE
[exec-shell]
[exec-shell] > Task :stripDebugDebugSymbols UP-TO-DATE
[exec-shell] WARNING: Compatible side by side NDK version was not found. Default is 21.0.6113669.
[exec-shell] Compatible side by side NDK version was not found. Default is 21.0.6113669.
INFO [exec-shell]
INFO [exec-shell] > Task :validateSigningDebug UP-TO-DATE
INFO [exec-shell] > Task :packageDebug
INFO [exec-shell] > Task :assembleDebug
INFO [exec-shell]
INFO [exec-shell] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[exec-shell] Use '--warning-mode all' to show the individual deprecation warnings.
[exec-shell] See













Tuesday, 24 March 2020

Error while generating object model : Generation of Object models failed?

 Error while generating object model : Generation of Object models failed. Error : Command failed: "D:\Software\Visualizer\jre\bin\java.exe" -DKONY_MFCLI_PROPERTIES_FILE="D:\WorkspacePBank\konyfabriccli.properties" -jar "D:\Software\Visualizer\lib\mf\mfcli.jar" object-services-meta --token "eyAidHlwIjogImp3dCIsIC" -a "TestApplication" -v "1.0" -e "" -clurl "https://manage.kony.com" >



ERROR: Unable to fetch the publish information of the fabric app against the environment specified. Reason- Unable to fetch App key, App Secret, Service URL and Service Document as app is not published to the specified environment



Soulution is : 

             publish your mobile fabric application

Wednesday, 20 November 2019

JSONException Unexpected Identifier Error in Kony Visualizer

D/KonyJavaScriptVM: ************** Compiling Script file : frmDashboardController.js
2020-11-19 10:42:28.129 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSVM.cpp :: KonyJSVM_compileScriptENTER
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: ****************** V8 Message  *********************
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: message=Uncaught SyntaxError: Unexpected identifier
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: ****************************************************
2020-11-19 10:42:28.130 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: getJSExceptionENTER
2020-11-19 10:42:28.131 20528-20571/com.orgname.SampleV9App I/cr_CachingUmaRecorder: Flushed 5 samples from 5 histograms.
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace not empty ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace length  0 ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: ********** js exp stack trace not NULL ************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: getJSExceptionEXIT
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: *********************************************************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: frmDashboardController.js:5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: *********************************************************
2020-11-19 10:42:28.131 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: createJavaExceptionENTER
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSUtil.cpp :: createJavaExceptionEXIT
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/KONYJNI: KonyJSVM.cpp :: KonyJSVM_compileScriptEXIT
2020-11-19 10:42:28.132 20528-20551/com.orgname.SampleV9App D/JSGlobalLib: onFileCompiledimportScripts : statusMsg=frmDashboardController.js:5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier] statusCode= expObj=frmDashboardController.js : 5
        registerDeviceID: function 
    Uncaught SyntaxError: Unexpected identifier









Monday, 17 June 2019

used to override an existing property.\n[available] Build file should not reuse the same property name for different values?



How to Build our app from the Command Line in Kony Visualizer Projects?




Build your app from the command line

About build types :-


   By default, there are two build types available for every Android app: one for debugging your app—the debugbuild—and one for releasing your app to users—the release build. The resulting output from each build must be signed with a certificate before you can deploy your app to a device. The debug build is automatically signed with a debug key provided by the SDK tools (it's insecure and you cannot publish with it to the Google Play Store), and the release build must be signed with your own private key.


 Build a debug APK


      For immediate app testing and debugging, you can build a debug APK. The debug APK is signed with a debug key provided by the SDK tools and allows debugging through adb.
To build a debug APK, open a command line and navigate to the root of your project directory. To initiate a debug build, invoke the assembleDebug task:
gradlew assembleDebug
This creates an APK named Project Name-debug.apk in
project_name/module_name/build/outputs/apk/. The file is already signed with the debug key and aligned with zipalign, so you can immediately install it on a device.


Steps :

 1) Project Location ===> cmd
 2) gradlew assembleDebug

Videos :-




Thursday, 11 April 2019

kony build.gradle add dependencies


build.gradle entries to Suffix

 android {
     compileSdkVersion 26
       useLibrary 'org.apache.http.legacy'
 defaultConfig {
       multiDexEnabled true
    }

compileOptions {
sourceCompatibility 1.8
 targetCompatibility 1.8
 }
 dexOptions {
    javaMaxHeapSize "4g"
    }
 }
dependencies.compile 'com.android.support.constraint:constraint-layout:1.1.3'
dependencies.compile 'org.tensorflow:tensorflow-android:1.12.0'
dependencies.compile 'com.google.android.gms:play-services-vision:17.0.2'
dependencies.compile 'com.android.support:recyclerview-v7:26.1.0'
dependencies.compile 'com.android.support:support-v13:26.1.0'
dependencies.compile 'com.android.support:appcompat-v7:26.1.0'





gradle.properties entries

       android.enableD8.desugaring = true









Sunday, 13 January 2019

how to hit the service without Mobile Fabric in Kony visualizer?

HttpRequest 

        To send requests to any resource on the network and fetch the response

Sending a JSON Object and String data as a Request

Use one of the following:
//Directly sending JSON object
httpclient.send(postdata);
//Converting JSON object to JSON string and sending
var jsonStr1 = JSON.stringify(postdata); 
httpclient.send(jsonStr1);
//Sending JSON string
var jsonStr2= "{\"userId\":\"test\",\"password\":\"test123\"}";
httpclient.send(jsonStr2);


Example :-


define({

  onNavigate : function(objectEvent){
    this.view.btnServiceCallEvent.onClick = this.onServiceCallEventFun;
  },

  onServiceCallEventFun : function(){
    var httpclient = new kony.net.HttpRequest();
    httpclient.open(constants.HTTP_METHOD_POST, "https://neutrinoapi.com/email-validate");
    httpclient.setRequestHeader("user-id", "chandru");
    httpclient.setRequestHeader("api-key", "5wPeyo4c9dFcUIyWMTghQP80nj3k0uyJzgals0MNKQ9wAjyf");
    httpclient.setRequestHeader("Content-Type", "application/json");
    var postdata = {
      "email":"chandbecse@gmail.com",
      "fix-typos":true
    };
    httpclient.timeout = 20000;
    httpclient.onReadyStateChange = function(response){

      kony.print("Result valid  ==> "+response.valid);
      kony.print("Result provider  ==> "+response.provider);
      kony.print("Result domain ==> "+response.domain);
      kony.print("Result Response ==>  :"+JSON.stringify(response));

    };
    httpclient.send(postdata);
  }
});



Example Videos :




Friday, 11 January 2019

How to Working with Components, Kony Marketplace, and Masters?

Import a Component or Master

You can simplify and speed up development of mobile applications by using existing components. You can download a variety of components from Kony Marketplace and import them into your projects, or import reusable components that you have created yourself. For information on creating a component.




Videos : 






Wednesday, 26 December 2018

Could not open cp_settings remapped class cache

.gradle Error

kony project could not able to generating build. If you get below like that error pls follow the steps

Could not open cp_settings remapped class cache for 58m3icgml5mvwq3x44rfzqryy (C:\\Users\\user\\.gradle\\caches\\4.4\\scripts-remapped\\settings_ezedqcymecp5smsvknnr2xi4i\\58m3icgml5mvwq3x44rfzqryy\\cp_settings638c4bcc3be846fd35262b91d5a74869).


Solution:
  • Go to the C:\Users\YOUR_USERNAME\.gradle\caches and locate the subfolder that is being complained about in your error message (e.g., 4.4).
  • Rename that folder (e.g., to 4.4_OLD).
  • Back in Android Studio, do Clean Project then Rebuild Project.
This will then generate a new subfolder (e.g., 4.4) in your caches directory and the build should complete successfully.

Note : if you can't change the folder name pls End-Task 
 " Java(TM) Platform SE binary


Friday, 7 December 2018

Read Raw file data using Kony visualizer


function fileReadOptions(){
  try{
    var destFilePath = kony.io.FileSystem.getDataDirectoryPath()+"/getdetails.json";
    var myFile = new kony.io.File(destFilePath).createFile();
    alert("Path is "+destFilePath);
    var fileObj = null;
    try{
      var file = new kony.io.File(destFilePath);
      //copyBundledRawFileTo API overrides the destination file with new one.
      //Hence check before copying
      if(!file.exists()){
        fileObj = kony.io.FileSystem.copyBundledRawFileTo ("getdetails.json", destFilePath);
      }else{
        // fileObj = file;
        fileObj = kony.io.FileSystem.copyBundledRawFileTo ("getdetails.json", destFilePath);
        var reading = new kony.io.File(destFilePath).read();
        alert(JSON.stringify(reading));
        alert("readAsText()  "+reading.readAsText());
      }
    }catch(e) {
      kony.print("Exception "+e);
    }
  }catch(err){
    alert("Error  : "+JSON.stringify(err));
  }
}

Friday, 30 November 2018

Switch onslide event based data change in segment example

define({

  onNavigate : function(){
    kony.print("onNavigate");
    var segList = [{
      imgOS: "msdosimag.png",
      template: "flxSegTemplate",
      lblOSName: "MS-DOS",
      switchData : {onSlide:this.onSlideCallback}
    }, {
      imgOS: "linuximag.png",
      template: "flxSegTemplate",
      lblOSName: "Linux",
      switchData : {onSlide:this.onSlideCallback}
    },{
      imgOS: "callicon.png",
      template: "flxSegTemplate",
      lblOSName: "Call Icon",
      switchData : {onSlide:this.onSlideCallback}
    }];

    this.view.segExciseExample.widgetDataMap = { imgOS: "imgOS",
                                                lblOSName: "lblOSName",
                                                switchData :"switchData" };
    this.view.segExciseExample.setData(segList);

  },

  onSlideCallback : function(eventObject){
    try{
   
      var segSelectedIndex = this.view.segExciseExample.selectedIndex[1];
      var selectedIndexVal = eventObject.selectedIndex;
      alert("Selected Index "+selectedIndexVal);
      if(selectedIndexVal === 0){
        alert("ON =====================================>");
        var updateVal ={
          imgOS: "callicon.png",
          template: "flxSegTemplate",
          lblOSName: "Call Icon22344",
          switchData : {onSlide:this.onSlideCallback,selectedIndex:0}
        };
        this.view.segExciseExample.setDataAt(updateVal, segSelectedIndex);
      }else{

        alert("OF =====================================>");
         var updateVal ={
          imgOS: "callicon.png",
          template: "flxSegTemplate",
          lblOSName: "Call IconOFFF",
          switchData : {onSlide:this.onSlideCallback,selectedIndex:1}
        };
        this.view.segExciseExample.setDataAt(updateVal, segSelectedIndex);
      }
    }catch(err){
      alert("Error : "+err);
    }
  }

Wednesday, 28 November 2018

Segment Excise example for Kony MVC architecture?

define({

  onNavigate : function(){

    var segList = [{

      imgOSKey: "msdosimag.png",

      template: "flxSegTemplate",

      lblOSNameKey: "MS-DOS"

    }, {

      imgOSKey: "linuximag.png",

      template: "flxSegTemplate",

      lblOSNameKey: "Linux"

    }];

    this.view.segExciseExample.widgetDataMap = {imgOS:"imgOSKey",lblOSName:"lblOSNameKey"};

    this.view.segExciseExample.setData(segList);

  }
});

Monday, 12 November 2018

Adding Link and underline in Rich text kony segment Dynamic example




function dynamicSegmentData(){
  try{
    var listData = ["Android","Java","Dotnet","FrameWrok","Next"];
    var arrayList = [];
    for(var i=0;i      var templa = {"rechTextVal":{text:""+listData[i]+""}};
      arrayList.push(templa);
    }
    frmRichText.segmentRichText.setData(arrayList);
  }catch(err){
    alert("Error"+err);
  }
}




Thursday, 8 November 2018

Kony Dynamic TextBox widget?


Dynamic TextBox widget adding into the flex container

var countID = 0;
function addDynamicTextBoxEvent(){

  try{
    var txtBasic = {id:"textBox"+countID,placeholder:"enter text",maxTextLength:100,left:"10dp",top:"10dp",skin:"skintxtBoxroundGray120",focusskin:"skinTextBoxFocusGray120",isVisible:true};
    var txtLayout = {padding:[5,0,0,0], margin:[5,5,5,5], containerWeight:100, hExpand:true, widgetAlignment:constants.WIDGET_ALIGN_TOP_LEFT};
    var txtPSP ={placeholderSkin:"skintxtPlaceholderGray120"};
    var textBox1 = new kony.ui.TextBox2(txtBasic,txtLayout,txtPSP);
    frmDynamicTxtBox.flexHari.add(textBox1);
    countID++;
    alert(countID);
  }catch(err){
    alert("Exception while occuring..."+err);
  }
}
























                                                                                                                                               Reference 

Monday, 5 November 2018

Kony Log Location

Logging Appender
Kony Fabric supports below-mentioned logging appenders:
1. File Logging: This is used to log the information in a file (.log format) stored in the user’s system. This is supported in both Windows and Linux environments.
Log Location
  • For Tomcat and JBoss single node, logs are created in < Kony Fabric Install Dir>/logs folder.
  • For JBoss cluster/multinode and WebLogic, logs are created in /konymflogs folder.
  • For WebSphere, logsare created in /AppServer/logs/konymflogs folder.
We create separate log file for each service as mentioned below:


2. Sys logging: This is used to log the information in system log using UDP protocol. This is supported only for the Linux environment. This is the best way to store all the information in a single place.
3. Database logging: This is used to store the log in the database of each service. This is mainly useful in a clustered/multinode environment when services are running in more than one box and logs need to store at a centralized location. Kony Fabric supports MySQL, MS SQL Server, Oracle and DB2 database server for database logging in both Windows and Linux environment.



Kony middleware Logging


For logging, use log4j statements instead of System.out.println() statements


Logging Detailed Location : KonyFabricInstaller folder\logs\admin.log




Wrap the debug statements with the log.isDebugEnabled() method. For example.

Java Syntax :

if (logger.isDebugEnabled())
{
...logger.debug("printing debug info")
}



Java Example :

import java.util.HashMap;

import org.apache.log4j.Logger;

import com.konylabs.middleware.cloud.LoggerBean;
import com.konylabs.middleware.common.DataPreProcessor;
import com.konylabs.middleware.controller.DataControllerRequest;
import com.konylabs.middleware.dataobject.Result;

public class ExampledebugLogging implements DataPreProcessor {

public static final Logger LOG = Logger.getLogger(ExampledebugLogging.class);

@Override
public boolean execute(HashMap arg0, DataControllerRequest arg1, Result arg2) throws Exception {

LOG.debug("======Testing Pre processor debug printing=====start====");

if(LOG.isDebugEnabled()) {

LOG.debug("================Log Priting==============");
LOG.debug("======Testing Pre processor debug printing=====");
}
LOG.debug("======Testing Pre processor debug printing======end=======");

return true;
}
}




JavaScript Example :


function fun1() {
    logger.debug('Tesing put method of HashMap');
    serviceInputParams.put('place', 'London');
    return true;
}
fun1();






A failure occurred while executing com.android.build.gradle.tasks

Error in Kony visualizer V9 service pack 6 and FX11  [2023-01-09 22:23:32.695] [DEBUG] ~~~~ - INFO [exec-shell] Execution failed for task ...