java.lang.ClassNotFoundException in android studio - android

i am trying to add module and but its gvien error like this:
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.anghatechsolution.eww.datetimepicker.SlidingTabStrip" on path:
DexPathList[[zip file
"/data/app/com.anghatechsolution.eww.datetimepicker-1/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]
can any one having idea about this.

This error means, that you are trying to access class, that currently doesn't exist.
Try to check the name of class, you accessing

You can solve it by setting the name attribute to your class like this:
[Activity(Name = "somepackage.custombuttonrenderer")]
public class CustomButtonRenderer: ButtonRenderer
{ }
An explanation is in my answer here: Why is my custom ButtonRenderer not working?

Related

Android MapBox Java SDK error when displaying map

I'm trying to use the sdk in a java android project.
I use this sdk :
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.3.0'
When i launch the screen with the Mapview, i got the "getDataNetworkTypeForSubscriber" error
When searching a solution to this error multiple answer tell to import this dependency
implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:6.3.0'
But when i launch the screen with this dependecy i got this error :
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/android/telemetry/MapEventFactory;
....
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.android.telemetry.MapEventFactory" on path: DexPathList[[zip file "/data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/lib/arm64, /data/app/~~rUziWglMhPfBsvW8AaITbQ==/com.trema.encheres.dev-aI_CEkUkLFmlvawtp7adLQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
What am I doing wrong ? Is there something i forgot ? A dependency ?
I try to add this dependency
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-core:6.3.0'
but i got the error message when building :
Could not find com.mapbox.mapboxsdk:mapbox-sdk-core:6.3.0.
Thanks

Gradle migration : Unable to instantiate application ClassNotFoundException. Didn't find class “Application” on path: DexPathList

Gradle migration : Unable to instantiate application ClassNotFoundException. Didn't find class “Application” on path: DexPathList
The problem is similar to this
Please check it to see what is happening.
I want to find other reserved words or other things would make this problem.

Android JNI FindClass not finding R.id

I am trying to find the value for a resource id. The first step of loading R class fails:
jclass rcl = (*env).FindClass("my/package/R$id");
the value of rcl is NULL. I tried
jclass rcl = (*env).FindClass("my/package/R/id");
which also returns null.
Finding other classes such as MainActivity working fine. Using NDK15. What could be wrong?
Output of javap:
http://siara.cc/output.txt
EDITED:
On changing class name to just my/package/R, I find the following line in the adb log:
exception: java.lang.ClassNotFoundException: Didn't find class "my.package.R" on path: DexPathList[[zip file "/data/app/my.package-1/base.apk"],nativeLibraryDirectories=[/data/app/my.package-1/lib/arm, /system/fake-libs, /data/app/my.package-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /system/vendor/lib]]
The problem was solved by adding proguard rule like this:
-keep class my.package.R$* { *; }
It appears that proguard obfuscates R class as well.

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.

java.lang.ClassNotFoundException on my android app and the Xml is find

I have met a problem follow:
07-20 18:10:52.755: ERROR/AndroidRuntime(3019): Caused by: java.lang.ClassNotFoundException: com.lok.camfly.CamFlyCtrlMain in loader dalvik.system.PathClassLoader[/mnt/asec/com.lok.camfly-2/pkg.apk]
I have search about this problem on google. So i check my xml and found that it is find. And the class name is match with the xml Activity name.
Could someone help me? Thank you very much!!!
Please try and check if you have mentioned "package" entry in Manifest file. This could be the reason for the issue. Share the result.

Categories

Resources