Error while trying to install the application in flutter on physical mobile

Asked

Viewed 1,129 times

0

I’m having trouble installing my application on my physical phone(Redmi 6 note PRO), I’ve done some tests and the problem is in the plugin authentication with facebook, flutter_facebook_login, if I remove the same from my project it installs normally. Searching the internet I found some solutions: change the API to 28, disable wifi or mobile data, check the network proxy, turns out that not one solved my problem, and in the case of API I’m already in 28.

Running on the terminal flutter -v --bug-report run, it goes through gradlew normally and hangs at the time of installation/ application execution.

[   +1 ms] Installing build\app\outputs\apk\app.apk... (completed in 43,4s)
[  +61 ms] executing: C:\Users\User\AppData\Local\Android\sdk\platform-tools\adb.exe -s e87dd33d shell echo -n 68dff8b87b96398b2fbec0564a8c02ee1e20e879 >
/data/local/tmp/sky.br.com.sancon.app_gera.sha1
[ +483 ms] Redmi Note 6 Pro startApp
[   +5 ms] executing: C:\Users\User\AppData\Local\Android\sdk\platform-tools\adb.exe -s e87dd33d shell am start -a android.intent.action.RUN -f 0x20000000 --ez
enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true br.com.sancon.app_gera/br.com.sancon.app_gera.MainActivity
[ +546 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=br.com.sancon.app_gera/.MainActivity (has extras) }
[   +4 ms] Waiting for observatory port to be available...

it is awaited and does not come out of it, and on the mobile the app flashes on the screen but soon closes, if I ask to show the application execution report it returns me it:

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager;
    at com.facebook.internal.BoltsMeasurementEventListener.open(BoltsMeasurementEventListener.java:54)
    at com.facebook.internal.BoltsMeasurementEventListener.getInstance(BoltsMeasurementEventListener.java:70)
    at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:313)
    at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:246)
    at com.facebook.internal.FacebookInitProvider.onCreate(FacebookInitProvider.java:20)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1927)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:1902)
    at android.app.ActivityThread.installProvider(ActivityThread.java:6532)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6025)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5931)
    at android.app.ActivityThread.access$1200(ActivityThread.java:200)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:201)
    at android.app.ActivityThread.main(ActivityThread.java:6810)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/br.com.sancon.app_gera-3tnaw23GJtmgjgsVn442TQ==/base.apk"],nativeLibraryDirectories=[/data/app/br.com.sancon.app_gera-3tnaw23GJtmgjgsVn442TQ==/lib/arm64, /data/app/br.com.sancon.app_gera-3tnaw23GJtmgjgsVn442TQ==/base.apk!/lib/arm64-v8a, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 18 more

I have also tried to use version 1.2.0 of the plugin that does not use Androidx, however it of the conflict, I am trying to use the most current version( 2.0.1).

My nootbook and mobile does not have lock for facebook or something like that on the network, and I’m using Android Studio.

  • If your goal is to use Facebook only for Users during login in your application, I would recommend using Google Firebase which besides being free and unlimited is much more "Reliable" than a pub lib. Here is a tutorial that teaches how to integrate facebook login into flutter with Firebase. https://www.youtube.com/watch?v=XxZLHP0fGwk&t=103s

  • at this point I didn’t want to use Firebase, but by the way I won’t have choice kkk

  • While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - Of Revision

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.