Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

ConnectivityChangeBroadcastReceiver thrown on 2.3.0-beta* #30

Closed
SimonSimCity opened this issue Oct 11, 2016 · 13 comments
Closed

ConnectivityChangeBroadcastReceiver thrown on 2.3.0-beta* #30

SimonSimCity opened this issue Oct 11, 2016 · 13 comments

Comments

@SimonSimCity
Copy link

I've recently tried out the version 2.3.0 beta-7, you published, and got the following exception:

Java.Lang.ClassNotFoundException: Didn't find class "md546bf78c6c1ea5df684f3f928d8d05883.ConnectivityChangeBroadcastReceiver" on path: DexPathList[[zip file "/data/app/com.storeflix.droid-1/base.apk"],nativeLibraryDirectories=[/data/app/com.storeflix.droid-1/lib/arm64, /system/fake-libs64, /data/app/com.storeflix.droid-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]

I haven't tested it thorroghly, but found this issue in the Xamarin forum, that looks like the same error: https://forums.xamarin.com/discussion/79841/connectivity-plugin-noclassdef-exception-with-latest-android-version-nougat

Went back to 2.2.12 and it works again.
Tested on Samsung SM-T280 (API 22)

@jamesmontemagno
Copy link
Owner

I am unable to reproduce this on new builds at all on both Cycle 7 and Cycle 8 targeting against API 23 or API 24. You can try 2.3.0.34-beta which is the latest.

@flaviusdemian
Copy link

This is also happening an a Dell Venue 8 - 7840 - which has Android API 22. Reverted to 2.2.12 and it works again. Maybe this helps.

@marcelojmacedo
Copy link

It happened on a Lenovo Tab 2A7-20F.
What are the consequences of commenting the MainApplication file?
I just commented this: //[Application] and the app runs again.

@Greg767
Copy link

Greg767 commented Oct 25, 2017

Wow I suddenly started to get this exception with 3.0.3. I am on the latest build tools (26.0.2, 26.1.1 SDK tools). The target is level 26. Visual Studio on Mac.
I tried the latest beta and also the 2.2.12 but nothing works.

Always getting the class not found exception and this in the output:
[Mono] Assembly Loader probing location: '/storage/emulated/0/Android/data/ch.elopsis.grat_ici/files/.override/Plugin.Connectivity.dll'.
[Mono] AOT: image '/storage/emulated/0/Android/data/ch.elopsis.grat_ici/files/.override/Plugin.Connectivity.dll.so' not found: dlopen failed: library "/data/app/ch.elopsis.grat_ici-1/lib/arm64/libaot-Plugin.Connectivity.dll.so" not found
[Mono] AOT: image '/usr/local/lib/mono/aot-cache/arm64/Plugin.Connectivity.dll.so' not found: dlopen failed: library "/data/app/ch.elopsis.grat_ici-1/lib/arm64/libaot-Plugin.Connectivity.dll.so" not found
[Mono] Assembly Ref addref GRATICI[0x7b60e22500] -> Plugin.Connectivity[0x7b60e18000]: 3
[Mono] Assembly Ref addref GRATICI[0x7b60e22500] -> Plugin.Connectivity.Abstractions[0x7b781fbf00]: 4

@jamesmontemagno
Copy link
Owner

Looks like you are AOTing it... haven't test that out. Would report in bugzilla.

@Greg767
Copy link

Greg767 commented Oct 26, 2017

Thanks for your input on this James, although I don't understand it. What do you mean by "you are AOTing it"? Is there a compiler setting somewhere for it? I haven't set anything on purpose to AOT it. I have to use ProGuard and MultiDex in my project otherwise it doesn't compile at all (error code 1 or 2).
I was looking at multidex setup with the .keep file because I was thinking that it doesn't find it because of that.

@Greg767
Copy link

Greg767 commented Oct 26, 2017

So the exception (not the output) contains this: Didn't find class "md5a7903531ac28e2eb4c8576cdf2655bda.ConnectivityChangeBroadcastReceiver" on path: DexPathList[[zip file "/data/app/ch.elopsis.grat_ici-1/base.apk"],nativeLibraryDirectories=[/data/app/ch.elopsis.grat_ici-1/lib/arm64, /data/app/ch.elopsis.grat_ici-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
And looking at the classes2.dex file I find the ConnectivityChangeBroadcastReceiver but the package is this: md55acd92097db1193d6a1e7330cb14252a which is not the same as in the excpetion. I don't really understand how it is possible.

@Greg767
Copy link

Greg767 commented Oct 26, 2017

James, FYI I have a VS2017 Mac Community edition, so I cannot handle the AOT by gui and setting it to false in the csproj file has no effect on anything. Output is the same and the error is the same.
Any ideas where to look?

@Greg767
Copy link

Greg767 commented Oct 26, 2017

Bahhh I found the problem. There is a bug in the latest stable Forms release....
https://bugzilla.xamarin.com/show_bug.cgi?id=60337

I just stepped one release back on Android....

@ruisilva450
Copy link

I'm still getting this:

Java.Lang.ClassNotFoundException: 
Didn't find class "md55acd92097db1193d6a1e7330cb14252a.ConnectivityChangeBroadcastReceiver" on path: 
DexPathList[[zip file "/data/app/cas.calock.apps.android-1/base.apk"],
nativeLibraryDirectories=[/data/app/cas.calock.apps.android-1/lib/arm64, 
/system/fake-libs64, /data/app/cas.calock.apps.android-1/base.apk!/lib/arm64-v8a, 
/system/lib64, /vendor/lib64]]

On Xamarin.Forms 2.5.0.121934 and Xam.Plugin.Connectivity 3.0.3
The OS is Android 7.0

@mo-kml
Copy link

mo-kml commented Dec 29, 2017

I have the exact error toooooo
Java.Lang.ClassNotFoundException: Didn't find class "md55acd92097db1193d6a1e7330cb14252a.ConnectivityChangeBroadcastReceiver" on path: DexPathList[[zip file "/data/app/cas.calock.apps.android-1/base.apk"],

I have to Publish today and i have no idea what should i do
any ideas?

@kensam94
Copy link

I solve the problem by adding Access Network State and Internet Permission.

@dationguyen
Copy link

facing the same issue, can't fix that at all

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants