dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
980 stars 579 forks source link

再问一次……偶发。安装成功后第一次启动时崩溃,再次点击正常运行 #741

Open SJJ-dot opened 3 years ago

SJJ-dot commented 3 years ago

安装成功后第一次启动时崩溃,再次点击正常运行

目前在华为畅享9 Plus,华为m10平板上都有出现。没法稳定复现。

java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString() (tried Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString and Java_dji_midware_natives_SDKRelativeJNI_native_1getUsbAccessoryAttachedString__)
        at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method)
        at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:40)
        at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)
        at com.holosense.dji.utils.RegisterAppService$register$1$1.run(RegisterAppService.kt:41)
        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:784)

配置如下

    //Internal maven 4.11 exist error. please use 4.11.0.1 in internal maven.
    api ('com.dji:dji-uxsdk:4.14-trial1', {
        /**
         * Uncomment the "library-anti-distortion" if your app does not need Anti Distortion for Mavic 2 Pro and Mavic 2 Zoom.
         * Uncomment the "fly-safe-database" if you need database for release, or we will download it when DJISDKManager.getInstance().registerApp
         * is called.
         * Both will greatly reduce the size of the APK.
         */
        exclude module: 'library-anti-distortion'
        exclude module: 'fly-safe-database'

        /**
         * Uncomment the following line to exclude amap from the app.
         * Note that Google Play Store does not allow APKs that include this library.
         */
//         exclude group: 'com.amap.api'
        exclude group: 'com.google.android.gms'
        exclude group: 'com.mapbox.mapboxsdk'
    })
    compileOnly ('com.dji:dji-sdk-provided:4.14-trial1')
    api 'com.dji:library-networkrtk-helper:2.0.2'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 29
    buildToolsVersion 29.0.3
    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 28
        versionCode rootProject.ext.version.versionCode
        versionName rootProject.ext.version.versionName

        ndk {
            // On x86 devices that run Android API 23 or above, if the application is targeted with API 23 or
            // above, FFmpeg lib might lead to runtime crashes or warnings.
            abiFilters 'armeabi-v7a', 'arm64-v8a'
        }

        kapt {
            arguments {
                arg("AROUTER_MODULE_NAME", project.getName())
            }
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/rxjava.properties'

        doNotStrip "*/*/libdjivideo.so"
        doNotStrip "*/*/libSDKRelativeJNI.so"
        doNotStrip "*/*/libFlyForbid.so"
        doNotStrip "*/*/libduml_vision_bokeh.so"
        doNotStrip "*/*/libyuv2.so"
        doNotStrip "*/*/libGroudStation.so"
        doNotStrip "*/*/libFRCorkscrew.so"
        doNotStrip "*/*/libUpgradeVerify.so"
        doNotStrip "*/*/libFR.so"
        doNotStrip "*/*/libDJIFlySafeCore.so"
        doNotStrip "*/*/libdjifs_jni.so"
        doNotStrip "*/*/libsfjni.so"
        doNotStrip "*/*/libDJICommonJNI.so"
        doNotStrip "*/*/libDJICSDKCommon.so"
        doNotStrip "*/*/libDJIUpgradeCore.so"
        doNotStrip "*/*/libDJIUpgradeJNI.so"
        doNotStrip "*/*/libDJIWaypointV2Core.so"
        doNotStrip "*/*/libAMapSDK_MAP_v6_9_2.so"
        doNotStrip "*/*/libDJIMOP.so"
        doNotStrip "*/*/libDJISDKLOGJNI.so"

        pickFirst 'lib/*/libstlport_shared.so'
        pickFirst 'lib/*/libRoadLineRebuildAPI.so'
        pickFirst 'lib/*/libGNaviUtils.so'
        pickFirst 'lib/*/libGNaviMapex.so'
        pickFirst 'lib/*/libGNaviData.so'
        pickFirst 'lib/*/libGNaviMap.so'
        pickFirst 'lib/*/libGNaviSearch.so'
        pickFirst 'lib/*/libDJIFlySafeCore.so'
        pickFirst 'lib/*/libdjifs_jni.so'
        pickFirst 'lib/*/libsfjni.so'
        exclude 'META-INF/proguard/okhttp3.pro'
        exclude 'META-INF/rxjava.properties'
        exclude 'assets/location_map_gps_locked.png'
        exclude 'assets/location_map_gps_3d.png'
    }

    lintOptions {
        abortOnError false
        checkReleaseBuilds false
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }
    dexOptions {
        incremental true
        javaMaxHeapSize "4g"
    }
}
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    //arouter
    api 'com.alibaba:arouter-api:1.5.1'
    kapt 'com.alibaba:arouter-compiler:1.2.2'
}
dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #42989:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。 这个崩溃问题能否使用官方的4.14trial1 sample复现? 大概的概率是多少?都是处于安装成功第一次启动才有概率发生是吗? 华为畅享9 Plus,华为m10平板搭载的安卓系统分别时候多少? https://github.com/dji-sdk/Mobile-SDK-Android

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

SJJ-dot commented 3 years ago

出现都是第一次安装出现。不好复现,因为同样的包再次安装也不一定会复现。。。

------------------ 原始邮件 ------------------ 发件人: "DJI"<notifications@github.com>; 发送时间: 2021年1月14日(星期四) 中午11:47 收件人: "dji-sdk/Mobile-SDK-Android"<Mobile-SDK-Android@noreply.github.com>; 抄送: "978622005"<978622005@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [dji-sdk/Mobile-SDK-Android] 再问一次……偶发。安装成功后第一次启动时崩溃,再次点击正常运行 (#741)

Agent comment from Luce Luo in Zendesk ticket #42989:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。 这个崩溃问题能否使用官方的4.14trial1 sample复现? 大概的概率是多少?都是处于安装成功第一次启动才有概率发生是吗? 华为畅享9 Plus,华为m10平板搭载的安卓系统分别时候多少? https://github.com/dji-sdk/Mobile-SDK-Android

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SJJ-dot commented 3 years ago

概率比较高的。

------------------ 原始邮件 ------------------ 发件人: "dji-sdk/Mobile-SDK-Android" <notifications@github.com>; 发送时间: 2021年1月14日(星期四) 中午11:47 收件人: "dji-sdk/Mobile-SDK-Android"<Mobile-SDK-Android@noreply.github.com>; 抄送: "978622005"<978622005@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [dji-sdk/Mobile-SDK-Android] 再问一次……偶发。安装成功后第一次启动时崩溃,再次点击正常运行 (#741)

Agent comment from Luce Luo in Zendesk ticket #42989:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。 这个崩溃问题能否使用官方的4.14trial1 sample复现? 大概的概率是多少?都是处于安装成功第一次启动才有概率发生是吗? 华为畅享9 Plus,华为m10平板搭载的安卓系统分别时候多少? https://github.com/dji-sdk/Mobile-SDK-Android

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SJJ-dot commented 3 years ago

刚刚看了下具体的报错信息如下:

 java.lang.UnsatisfiedLinkError: dlopen failed: library "libdjivideo.so" not found      at java.lang.Runtime.loadLibrary0(Runtime.java:1016)      at java.lang.System.loadLibrary(System.java:1672)      at dji.midware.natives.SDKRelativeJNI.<clinit>(Unknown Source:6)      at dji.midware.natives.SDKRelativeJNI.native_getUsbAccessoryAttachedString(Native Method)      at dji.sdk.sdkmanager.DJISDKManager.<clinit>(Unknown Source:40)      at dji.sdk.sdkmanager.DJISDKManager.getInstance(Unknown Source:0)      at com.holosense.dji.utils.RegisterAppService$register$1$1.run(RegisterAppService.kt:42)      at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)      at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)      at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)      at java.util.concurrent.FutureTask.run(FutureTask.java:266)      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)      at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)      at java.lang.Thread.run(Thread.java:784)

第二次启动就不会再报

------------------ 原始邮件 ------------------ 发件人: "dji-sdk/Mobile-SDK-Android" <notifications@github.com>; 发送时间: 2021年1月14日(星期四) 中午11:47 收件人: "dji-sdk/Mobile-SDK-Android"<Mobile-SDK-Android@noreply.github.com>; 抄送: "978622005"<978622005@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [dji-sdk/Mobile-SDK-Android] 再问一次……偶发。安装成功后第一次启动时崩溃,再次点击正常运行 (#741)

Agent comment from Luce Luo in Zendesk ticket #42989:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。 这个崩溃问题能否使用官方的4.14trial1 sample复现? 大概的概率是多少?都是处于安装成功第一次启动才有概率发生是吗? 华为畅享9 Plus,华为m10平板搭载的安卓系统分别时候多少? https://github.com/dji-sdk/Mobile-SDK-Android

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.