android ClassNotFoundException after trying to change minimum sdk - android

I am really getting desperate.
I have a working app - theoretically.
Tried to change the sdk version from 8 to 13.
Now when I start the app I get a Fatal exception, or rather a ClassNotFoundException for the very first activity started:
10-15 16:56:22.370: E/AndroidRuntime(862): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.pris/com.example.pris.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.pris.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.pris-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.pris-1, /system/lib]]
Apparently there seems to be some mixup with paths, but I have not the slightes idea where, or how to fix this.
Please help!

clean rebuild and restart project.. btw do you have any additional libraries??
if so get rid of them
lol..

Related

Ionic/Cordova app does not find MainActivity

My app (Ionic 5 + Cordova 9.1.0) crashes when I try to start it on an Android 11 phone. When I look into the logs with logcat I see that the main activity is not found:
10-21 16:31:29.281 5300 5300 E AndroidRuntime:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{de.meingolfclub.myapp/de.meingolfclub.myapp.MainActivity}:
java.lang.ClassNotFoundException: Didn't find class
"de.meingolfclub.myapp.MainActivity" on path: DexPathList[[zip file
"/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/base.apk"],nativeLibraryDirectories=[/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/lib/arm64,
/data/app/~~7FMRVcshmIuFxkzCRS8B2g==/de.meingolfclub.myapp-kbOatrQJj_K4ZJHsuXESTg==/base.apk!/lib/arm64-v8a,
/system/lib64, /system_ext/lib64]]
I googled a bit and it seems to be related to multiDex functionality of Android, but I have no idea how to fix this in an Ionic/Cordova project.
What can I do to solve this problem?
I solved it.
There was a wrong package name in MainActivity. After removing the Android platform and adding it again the package name was correct. And after a build the starts again.

CoreComponentFactoryDidn't find class "android.support.v4.app.CoreComponentFactory"

I got sudden crash in my google pixel 2 having android 9 version.
Is there any hint what is the reason behind that and it is not reproducible every time.
detail logs...
Didn't find class "android.support.v4.app.CoreComponentFactory" on
path: DexPathList[[zip file
"/data/app/com.google.android.deskclock-o_Iury9TRKVebStZjRrd0g==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.deskclock-o_Iury9TRKVebStZjRrd0g==/lib/arm64,
/system/lib64]]
Just clean the build and run it will go away

Android application signed with same key store using same sharedUserId crashes due to java.lang.RuntimeException: Unable to instantiate activity

I want to make some Android applications running in the same process, so I give those apps's AndroidManifest the same sharedUserId:
< manifest xmlns:android="http://schemas.android.com/apk/res/android"
...
android:sharedUserId="aaa.bbb" >
and assign each apps's application the same process:
< application
...
android:process="com.mytest" >
It works in android 4.4.4 , all the Applications run in the same Process.
But crash happened in android 6.0.1.
When I run the second app, it crashes due to:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}:
java.lang.ClassNotFoundException: Didn't find class "com.example.myapplication.MainActivity" on path:
DexPathList[[zip file "/data/app/com.example.myapplication-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.myapplication-1/lib/arm, /vendor/lib, /system/lib]]
after the system kill the Process, the second app can run and crashes if I run the first application.
It seem that applications can not run in the same process in the same time and I do not know why.
Each APK has its own ClassLoader. An article talking about this.
So it's normal you can't access a class of another APK.
It seems that a security bug was fix between Kitkat and Marshmallow.
Why you need this system ?
If it's to share data between application, you could use ContentProvider
If it's to launch Activity or Service, you could use Intent with action.
I fixed it !
disable the options in Android studio ant it works !

GCM push noti in Unity3d causes gms.iid.InstanceID classnotfound

I have made an Android plugin to use GCM in my Unity app. When I try to start the RegistrationIntentService (readymade example class from Android Developer Manual site), it causes a crash with the exception
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.iid.InstanceID" on path: DexPathList[[zip file "/data/app/com.ex.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ex.test-1/lib/arm, /vendor/lib, /system/lib]]
I have imported the play-services-9.2.0.unitypackage, without any success. Any help?
For anyone who might want to look for this question answered, I found the solution. The InstanceID.class is not included in the play-services-9.2.0.unitypackage, so include the play-services-iid-9.0.2.aar in the Android -> Plugins folder.

Achart 1.0.0 example android API 15

Alright, I have been messing with this for a few hours now, and I can't figure out why I'm having issues.
I have been following the example from
http://xebee.xebia.in/2010/08/31/exploring-android-charting-and-graphs-solutions/
AND
I have already tried to create a fix using this link:
Android achartengine simple pie chart
AND
I have tried using the demo that achartengine provides Here.
But that project crashed immediately after selecting a chart type on my android device.
I am new to android, and have followed those two resources almost exactly, and I'm getting this:
Conversion to Dalvik format failed with error 1
None of my src files are showing up with errors, and I have added the new activity in AndroidManifest.xml and achartengine-1.0.0.jar into my libs folder
I am using Android 4.0.3 API Level 15
I can't believe I am having this much trouble with such a seemingly simple task, but I appreciate your help.
EDIT:
this is a snippit from my log:
07-04 17:03:58.650: E/AndroidRuntime(21611): FATAL EXCEPTION: main
07-04 17:03:58.650: E/AndroidRuntime(21611): java.lang.RuntimeException: Unable to start activity ComponentInfo{axiodesigns.com.caffeinezone2/axiodesigns.com.caffeinezone2.CzMain}: android.content.ActivityNotFoundException: Unable to find explicit activity class {axiodesigns.com.caffeinezone2/org.achartengine.GraphicalActivity}; have you declared this activity in your AndroidManifest.xml?
I have no activity called GraphicalActivity, and even after i added:
<activity android:name="GraphicalActivity"></activity>
I received the exact same error
quite a headscratcher
Found the fix, my build path was not recognizing that I had the .jar in my libs folder.
This fixed it:
The application AChartengine has stopped unexpectedly. Please try again
Thanks for the help all

Categories

Resources