Java.lang.classnotfoundexception When Install App From Apk
The error I describe below, occurs when: Install the app on a device directly from the APK. Download the app by Play Store The error don´t occurs when: Install apk through Ecli
Solution 1:
This is your error:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{my.package/my.package.MainActivity}: java.lang.ClassNotFoundException: Didn't find class"my.package.MainActivity" on path: DexPathList[dexElements=[zip file "/data/app/my.package-1.apk"],nativeLibraryDirectories=[/data/app-lib/my.package-1, /vendor/lib, /system/lib]]
Answer :
You have added library project as a reference to your project and also may be you have added jar files for ChartView
and support-v7
in your libs
folder and also as a Add External Jars
. So you have to enable both checkboxes for android-support-v7.jar
file and for chartview jar
file in order and export menu
.
The path for it is,
Project - Right Click - Properties - Java Build Path - Order and Export Menu.
Finally you need to clean and run your project.
Post a Comment for "Java.lang.classnotfoundexception When Install App From Apk"