Troubleshooting Android application development with KanziΒΆ
When you receive this error while building an Android package:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app.packageDebug'. > Failed to obtain compression information for entry
Make sure that you are using Android Studio version 4.1.0 or newer. This error occurs on Android Studio version 3.1.
When you receive this error while building an Android package:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app.packageDebug'. > Java heap space
Increase the available heap amount in the Gradle build system. For example, in Android Studio open the
<ProjectName>/Application/configs/platforms/android_gradle
project, in that project open thegradle.properties
file and set:org.gradle.jvmargs=-Xmx4608m
When you receive this error while building an Android package:
FAILURE: Build failed with an exception. * Where: Build file 'Engine\configs\platforms\android_gradle\kanziruntime\build.gradle' line: 103 * What went wrong: A problem occurred evaluating project ':kanziruntime'. > <PathToKanziWorkspace>\Engine\version.txt not found
In the
<ProjectName>/Application/configs/platforms/android_gradle
directory of your project create a file calledlocal.properties
and in that file set the correct location of your workspace. For example, set:kanzi.home=C\:\\KanziWorkspace_3_7_0_000
When you receive this error while building an Android package:
> Task :kanziruntime:cmakeInstallNativeLibsRelease FAILED 'cmake' is not recognized as an internal or external command, operable program or batch file. Execution failed for task ':kanziruntime:cmakeInstallNativeLibsRelease'. > Process 'command 'cmd finished with non-zero exit value 1
Add the path to the CMake bin folder to your system path. You can find the bin folder in the Android SDK, for example in android-sdkcmake3.10.2.4988404bin.
When you receive this warning while building an application that uses the Data_source_plugin_template:
More than one file was found with OS independent path 'lib/arm64-v8a/libkzcoreui.so'. This version of the Android Gradle Plugin chooses the file from the app or dynamic-feature module,but this can cause unexpected behavior or errors at runtime. Future versions of the Android Gradle Plugin will throw an error in this case
Update the Kanzi Gradle plugin to version 0.6.1. Whenever you update the Gradle version, update the Kanzi Gradle plugin to the same version.
When you receive this error when starting the Preview for a Kanzi Studio project that uses a Java Kanzi Engine plugin:
Failed to load plugin 'kzjvm.dll'.
Make sure that either:
PATH
environment variable includes the directory that contains thejvm.dll
from the 64-bit JDK. This can be either:The JDK which is bundled with Android Studio.
For example,
C:\Program Files\Android\Android Studio\jre\bin\server
.Your own OpenJDK installation.
For example,
<openjdk>\jre\bin\server
.
JAVA_HOME
environment variable is set to the 64-bit JDK path and the%JAVA_HOME%\bin\server
directory contains thejvm.dll
from the 64-bit JDK.