alann-maulana / flutter_beacon

An hybrid iBeacon scanner and transmitter SDK for Flutter Android and iOS.
Apache License 2.0
117 stars 144 forks source link

Not working when ranging beacon #17

Closed 1553011 closed 5 years ago

1553011 commented 5 years ago

Using the function Ranging beacon, I got the error like this: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager. Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available. I dont know how to fix this issue. Is there anyone know how to solve this problem ?

alann-maulana commented 5 years ago

Hi @1553011

What phone do you use for testing? Android version? I use Sams*ng S5 and S10+ and there are no error happen.

dvlj commented 5 years ago

same problem happen with samsung s7 (lastest android os version)

Victor-emil commented 5 years ago

I am also getting this exact error. It worked perfectly a month ago, but in the meantime I've updated dart to Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5). When booting up my project this morning I got the error. I'm on a Samsung Galaxy S6.

Edit: Actually I updated Flutter which also updated Dart. Flutter version is 1.5.4

awazgyawali commented 5 years ago

This is not working on Samsung phones. I dug in to check what's the issue, found that it uses this version of the library

api 'org.altbeacon:android-beacon-library:2.16.1'

but there is an update on the library available here and it mentions a fix on Samsung specific phone.

I have updated the version of the library and created a PR here.

@alann-maulana Can you merge that?

shinyford commented 5 years ago

I believe this is because the package is using an old appcompat library: upgrading it to AndroidX should solve the problem. @alann-maulana, is that something you're looking at doing?

EDIT Ah, just looked at your build.gradle, and it looks like you've already moved to AndroidX. Could this be in a dependency, then? Thanks for any and all help!

FURTHER EDIT: Somewhat embarrassingly, it was me that wasn't using AndroidX. Make sure you have the following lines in your gradle.properties:

android.useAndroidX=true
android.enableJetifier=true
alann-maulana commented 5 years ago

Sorry dudes, having a lot of homework last month. Already merge it. I hope it will fix your issue. Close it now :)

isaiasmac commented 4 years ago

I was having the same error, for hours trying to find a solution, and the solutions is simple add this to build.gradle

implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

alann-maulana commented 4 years ago

Great catch @isaiasmac

I'll consider adding those line to README within FAQ parts 😄