发现多个文件与操作系统独立路径“lib/armeabi/libBugly.so”

Tom*_*mmy 1 android gradle android-studio

我试图调试我的应用程序,但出现错误:

发现多个文件与操作系统独立路径“lib/armeabi/libBugly.so”

这是我的gradle的一部分:

android {
    compileSdkVersion 26
    dataBinding {
        enabled = true
    }
    defaultConfig {
        multiDexEnabled true
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 3
        versionName "1.0"

        ndk {
            abiFilters "armeabi", "armeabi-v7a"
        }
    }

}

dependencies {

    implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
    implementation 'com.tencent.bugly:nativecrashreport:latest.release'
 }
Run Code Online (Sandbox Code Playgroud)

我的项目中的 Android Studio 3.1.3、Gradle4.1。

Tom*_*mmy 6

在 app 的build.gradle 中添加一些东西:

android {
  packagingOptions {
    pickFirst 'lib/armeabi/libBugly.so'
  }
}
Run Code Online (Sandbox Code Playgroud)

然后,它起作用了。