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));
  }
}

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 ...