App failed to start after integrating FFI to Kony Visualizer

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi,

I wanna ask about FFI integration of Kony Visualizer (I used Kony Visualizer Version 8 Service Pack 2 Fix Pack 37). When I integrated the FFI to Kony Visualizer I got some trouble.

Some of them were solved by following the steps from this discussion (I got same issues as the author got). Here were some steps I followed:

  1. The FFI class extended KonyApplication instead of Application.
  2. Modified tag entries by adding this snippet (the android:name of my Kony was com.orgname.newVidCall)
tools:replace="android:name" android:name="com.myApps.vCallApp"

After the build process succeed, I installed the .apk file through adb command, and when I launched the application it suddenly force closed.

The error I got from the log was like this:

--------- beginning of crash 02-06 20:55:47.744 16130-16130/com.orgname.newVidCall E/AndroidRuntime: FATAL EXCEPTION: main Process: com.orgname.newVidCall, PID: 16130 java.lang.RuntimeException: Unable to instantiate application com.myApps.vCallApp: java.lang.ClassNotFoundException: Didn't find class "com.myApps.vCallApp" on path: DexPathList[[zip file "/data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/base.apk"],nativeLibraryDirectories=[/data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/lib/arm, /data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] at android.app.LoadedApk.makeApplication(LoadedApk.java:997) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5869) at android.app.ActivityThread.-wrap1(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:192) at android.app.ActivityThread.main(ActivityThread.java:6671) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:818) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myApps.vCallApp" on path: DexPathList[[zip file "/data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/base.apk"],nativeLibraryDirectories=[/data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/lib/arm, /data/app/com.orgname.newVidCall-StsFGltshleZDNvPeRcKjA==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.Instrumentation.newApplication(Instrumentation.java:1093) at android.app.LoadedApk.makeApplication(LoadedApk.java:991) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5869) at android.app.ActivityThread.-wrap1(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:192) at android.app.ActivityThread.main(ActivityThread.java:6671) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:818)

Is there any possible way to solve this issue?

I would be glad if anyone could help or give me some hints, because I already stuck for 2 days with the same issue.

Thank you. 🙇

@Joe Axwvhvm​ @Blvke Bond​ Any help here?

you can try to change your apps from extend Application to extend KonyApplication. Then you can try to change your minSDK to 19 since any sdk below 19 didn't support multidex.

@Neil Olivew​

Make these checks

1) Did you happen to copy required jar/aar to

path for mobile:

<Kony Visualizer Workspace>/<Project Folder>/resources/customlibs/libs/android/

or imported it from FFI's Manage Custom Library screen?

Can you check if your jar / aar with FFI implementation is in created lib's folder ?

If it doesn't exist copy lib or aar as suggested and rebuild application.

2) Is your apk created with minsdk < 21 , if not can you set minsdk < 21 and check

3) If both checks above are fine , check if your generated apk has 2 dex files and check if your class went into classes2.dex ?

you can use dex2jar to decompile .dex files to jar and use JDGUI to check the generated jar

Let me know your observations