deeplearning4j / deeplearning4j-examples

Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)
http://deeplearning4j.konduit.ai
Other
2.46k stars 1.82k forks source link

Android Example fails due to MainActivity's ClassNotFoundException #1056

Closed singam-sanjay closed 2 years ago

singam-sanjay commented 3 years ago

Issue Description

Please describe your issue, along with:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.androidDl4jClassifier, PID: 7312
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.androidDl4jClassifier/com.example.org.deeplearning4j.examples.androidclassifier.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.org.deeplearning4j.examples.androidclassifier.MainActivity" on path: DexPathList[[zip file "/data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/base.apk"],nativeLibraryDirectories=[/data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/lib/x86, /data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3365)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.org.deeplearning4j.examples.androidclassifier.MainActivity" on path: DexPathList[[zip file "/data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/base.apk"],nativeLibraryDirectories=[/data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/lib/x86, /data/app/~~DystIEzuKmEcf-5SpmWHbg==/com.example.androidDl4jClassifier-W1QFxM5MDgX1Ewt7IMM7dA==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
        at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41)
        at android.app.Instrumentation.newActivity(Instrumentation.java:1253)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3353)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:223) 
        at android.app.ActivityThread.main(ActivityThread.java:7656) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 

Version Information

Please indicate relevant versions, including, if relevant:

image

Please help with pointers to resolve this issue!

agibsonccc commented 2 years ago

Please use the community forums for further communication. Apologies, but this is right at the top of the readme.

zijian-z commented 2 years ago

@singam-sanjay , I met the same problem, have you solved this problem?

agibsonccc commented 2 years ago

@zijian-z as my above please use the community forums. This issue tracker is not used.