Closed savastekin closed 2 years ago
Hey @savastekin,
A few questions:
Did you follow the Android instructions in the Readme, with attention to each step?
Please post your app/build.gradle file from within the /android platform folder of your Flutter project.
Are you running this on a true Android device? (It won't work on an emulator)
Which Android version are you using on the device you are testing with?
Hello, I was test on Android Device version 4.4. When i try version 8.0 problem solved. Thank you.
Glad to hear @savastekin 👍
Closing.
Hello,
I tested example code. But when i click register app button i get error.
D/ViewRootImpl@fd7de0bMainActivity: ViewPostImeInputStage processPointer 0 D/ViewRootImpl@fd7de0bMainActivity: ViewPostImeInputStage processPointer 1 D/=== DjiPlugin Android( 5517): Register App Started I/art ( 5517): Rejecting re-init on previously-failed class java.lang.Class<cloud.dragonx.plugin.flutter.dji.DjiPlugin$registerApp$1>: java.lang.NoClassDefFoundError: Failed resolution of: Ldji/sdk/sdkmanager/DJISDKManager$SDKManagerCallback; I/art ( 5517): at void io.flutter.plugins.GeneratedPluginRegistrant.registerWith(io.flutter.embedding.engine.FlutterEngine) (GeneratedPluginRegistrant.java:19) I/art ( 5517): at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) I/art ( 5517): at void io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(io.flutter.embedding.engine.FlutterEngine) (GeneratedPluginRegister.java:80) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(io.flutter.embedding.engine.FlutterEngine) (FlutterActivity.java:965) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:187) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:430) I/art ( 5517): at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6955) I/art ( 5517): at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) I/art ( 5517): at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927) I/art ( 5517): at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3045) I/art ( 5517): at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) I/art ( 5517): at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1642) I/art ( 5517): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) I/art ( 5517): at void android.os.Looper.loop() (Looper.java:154) I/art ( 5517): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6776) I/art ( 5517): at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) I/art ( 5517): at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1496) I/art ( 5517): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1386) I/art ( 5517): Caused by: java.lang.ClassNotFoundException: Didn't find class "dji.sdk.sdkmanager.DJISDKManager$SDKManagerCallback" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/com.spectrum.meter.reader.test_app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.spectrum.meter.reader.test_app-2/lib/arm, /data/app/com.spectrum.meter.reader.test_app-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] I/art ( 5517): at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) I/art ( 5517): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) I/art ( 5517): at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) I/art ( 5517): at void io.flutter.plugins.GeneratedPluginRegistrant.registerWith(io.flutter.embedding.engine.FlutterEngine) (GeneratedPluginRegistrant.java:19) I/art ( 5517): at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) I/art ( 5517): at void io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(io.flutter.embedding.engine.FlutterEngine) (GeneratedPluginRegister.java:80) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(io.flutter.embedding.engine.FlutterEngine) (FlutterActivity.java:965) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:187) I/art ( 5517): at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:430) I/art ( 5517): at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6955) I/art ( 5517): at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) I/art ( 5517): at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927) I/art ( 5517): at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3045) I/art ( 5517): at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) I/art ( 5517): at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1642) I/art ( 5517): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) I/art ( 5517): at void android.os.Looper.loop() (Looper.java:154) I/art ( 5517): at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6776) I/art ( 5517): at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) I/art ( 5517): at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1496) I/art ( 5517): at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1386) I/art ( 5517): [dji.flutter] registerApp requested [dji.flutter] registerApp PlatformException Error PlatformException(NoClassDefFoundError, java.lang.NoClassDefFoundError: Failed resolution of: Ldji/sdk/sdkmanager/DJISDKManager$...