1

I'm trying to run my app on my device (Huawei Nova 4) but it crashes and in another phones don't.

Flutter problem, help

//start of code

Launching lib\main.dart on VCE L22 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Syncing files to device VCE L22...
I/zzbz    ( 3597): Making Creator dynamically
W/xample.alertta( 3597): Unsupported class loader
W/xample.alertta( 3597): Skipping duplicate class check due to unsupported classloader
E/        ( 3597): [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008]
I/DynamiteModule( 3597): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
I/DynamiteModule( 3597): Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
V/DynamiteModule( 3597): Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/ChimeraDebugLogger( 3597): Singleton logger instance not set.
W/xample.alertta( 3597): Unsupported class loader
W/xample.alertta( 3597): Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API( 3597): Google Play services client version: 12451000
I/Google Maps Android API( 3597): Google Play services package version: 17122039
W/xample.alertta( 3597): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
D/TextView( 3597): get Display Panel Type is : 0
D/HwWechatOptimizeImpl( 3597): mIsEffect:false
D/NetworkSecurityConfig( 3597): No Network Security Config specified, using platform default
D/HiTouch_PressGestureDetector( 3597): HiTouch on notch display, height corret:123
D/OpenGLRenderer( 3597):   HWUI Binary is  enabled
I/HiTouch_HiTouchSensor( 3597): HiTouch restricted: Sub windows restricted.
D/mali_winsys( 3597): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
I/iGraphics( 3597): [0030080c] opt app: 0
D/OpenGLRenderer( 3597):   HWUI Binary is  enabled
I/iGraphics( 3597): [0030080c] opt app: 0
D/mali_winsys( 3597): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/HwGalleryCacheManagerImpl( 3597): mIsEffect:false
W/DynamiteModule( 3597): Local module descriptor class for providerinstaller not found.
I/DynamiteModule( 3597): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller( 3597): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/xample.alertta( 3597): The ClassLoaderContext is a special shared library.
I/iGraphics( 3597): [0030080c] opt app: 0
I/xample.alertta( 3597): The ClassLoaderContext is a special shared library.
I/xample.alertta( 3597): The ClassLoaderContext is a special shared library.
V/NativeCrypto( 3597): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 284 native methods...
W/xample.alertta( 3597): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (light greylist, reflection)
I/iGraphics( 3597): [0030080c] opt app: 0
I/ProviderInstaller( 3597): Installed default security provider GmsCore_OpenSSL
E/AndroidRuntime( 3597): FATAL EXCEPTION: Thread-6
E/AndroidRuntime( 3597): Process: com.example.alerttap, PID: 3597
E/AndroidRuntime( 3597): java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
E/AndroidRuntime( 3597):    at gu.b(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):3)
E/AndroidRuntime( 3597):    at gr.a(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):3)
E/AndroidRuntime( 3597):    at gt.a(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):14)
E/AndroidRuntime( 3597):    at com.google.maps.api.android.lib6.drd.ak.a(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):4)
E/AndroidRuntime( 3597):    at fv.a(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):22)
E/AndroidRuntime( 3597):    at fv.run(:com.google.android.gms.dynamite_mapsdynamite@17122083@17.1.22 (100408-245988633):8)
E/AndroidRuntime( 3597): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000001a/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000001a/MapsDynamite.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
E/AndroidRuntime( 3597):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/AndroidRuntime( 3597):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime( 3597):    at ab.loadClass(:com.google.android.gms.dynamite_dynamiteloader@17122083@17.1.22 (100408-245988633):4)
E/AndroidRuntime( 3597):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime( 3597):    ... 6 more
D/ZrHung.AppEyeUiProbe( 3597): stop checker.
I/Process ( 3597): Sending signal. PID: 3597 SIG: 9
Lost connection to device.

I can't solve it

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
  • Please use [code formatting](https://stackoverflow.com/editing-help) to make your question easier to read, and check out [asking help](https://stackoverflow.com/help/how-to-ask). Also, provide more information about your device. – Edmore M Gonese Digolodollarz May 29 '19 at 21:31
  • Possible duplicate of [Android Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion](https://stackoverflow.com/questions/50782806/android-google-maps-java-lang-noclassdeffounderror-failed-resolution-of-lorg-a) – Edmore M Gonese Digolodollarz May 29 '19 at 21:37
  • Currently, I can't really tell what's the cause of the issue. For everyone to have an idea what is causing the error, could you provide [a minimal, complete and verifiable example](https://stackoverflow.com/help/minimal-reproducible-example)? Also, could you try adding `` in your Manifest `` tag as mentioned in this [SO post](https://stackoverflow.com/a/50794266/8342742)? – MαπμQμαπkγVπ.0 Oct 22 '20 at 20:35

1 Answers1

0

Checking the logs, the crash points to Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path.... Try this workaround posted here. You should be able to access the Android manifest file on your Flutter project and add this line inside <application>:

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Omatt
  • 8,564
  • 2
  • 42
  • 144