WARNING: ABIs [armeabi-v7a,armeabi] set by 'android.injected.build.abi' gradle flag contained 'ARMEABI' not targeted by this project

后端 未结 4 2053
面向向阳花
面向向阳花 2020-12-01 18:11

I had this issue last time after upgrade NDK version to latest version in Android Studio. I also found solution to fix this. If anyone has this issue , I hope it is the best

4条回答
  •  独厮守ぢ
    2020-12-01 18:27

    Got same issue and fixed through modifying the module build.gradle file by adding below setup:

    android {
        ...
        splits {
            abi {
                enable true
                reset()
                include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' //select ABIs to build APKs for
                universalApk true //generate an additional APK that contains all the ABIs
            }
        }
    
        project.ext.versionCodes = ['armeabi': 1, 'armeabi-v7a': 2, 'arm64-v8a': 3, 'mips': 5, 'mips64': 6, 'x86': 8, 'x86_64': 9]
    
        android.applicationVariants.all { variant ->
            variant.outputs.each { output ->
                output.versionCodeOverride =
                       project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 1000000 + android.defaultConfig.versionCode
            }
        }
    }
    

    For your reference, good luck.

提交回复
热议问题