【问题标题】:Inject additional attributes into the defaultConfig tag in the Android build.gradle在 Android build.gradle 的 defaultConfig 标签中注入额外的属性
【发布时间】:2021-02-28 09:51:31
【问题描述】:

我需要注入:

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

得到类似的东西:

android {

    [...] 

    defaultConfig {
        applicationId "app.myapp.client"
        minSdkVersion 24
        targetSdkVersion 29
        versionCode 100
        versionName "1.0"
        multiDexEnabled true
        ndk {
            abiFilters "armeabi-v7a", "x86", "armeabi", "mips"
        }
    }

    [...]

我已经在 Android Studio 中进行了测试,这解决了这个错误: https://github.com/codenameone/CodenameOne/issues/3377

这里解释原因: https://medium.com/mobiwise-blog/unsatisfiedlinkerror-problem-on-some-android-devices-b77f2f83837d

但我没有找到自动实现此目的的构建提示。我可以使用哪一个?

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    您可以使用构建提示:

    android.xgradle_default_config=ndk { abiFilters "armeabi-v7a", "x86", "armeabi", "mips"; }
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-13
    相关资源
    最近更新 更多