android - 发现多个文件的操作系统独立路径为 'lib/armeabi/libBugly.so'

标签 android android-studio gradle

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

More than one file was found with OS independent path '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'
 }

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

最佳答案

在应用程序的 build.gradle 中添加一些东西:

android {
  packagingOptions {
    pickFirst 'lib/armeabi/libBugly.so'
  }
}

然后,它起作用了。

关于android - 发现多个文件的操作系统独立路径为 'lib/armeabi/libBugly.so',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51943269/

相关文章:

android - 加载图形布局时出现缺少主题错误

Android HLS 视频 mime 类型

android - 无法在 Android Studio 中为 Flutter 项目添加依赖项

android - androidstudio2多种APK

android - React Native 找不到 com.android.tools.build :gradle:3. 4.2

Android:管理不同的服务器 URL 以进行开发和发布

java - 尝试构建 APK 时,Gradle Build 因意外错误而失败

android - 应用程序未导入android studio

java - Heroku[web.1] : State changed from starting to crashed

java - 在线程外使用 String