Errors updating from NDK version 16 to NDK version 17

前端 未结 1 467
北海茫月
北海茫月 2020-12-11 22:42

This is for an Android project using JNI with the NDK. I\'m building the project with Android Studio 3.0.1. I recently updated my NDK from version 16 to version 17 in the

相关标签:
1条回答
  • 2020-12-11 23:22

    It should be enough to upgrade your gradle plugin to 3.1.2 or higher, in root (project) build.gradle script. Using the latest plugin is recommended not only to be compliant with latest NDK:

    buildscript {
      dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
      }
    }
    

    You also must change gradle/wrapper/gradle-wrapper.properties:

    distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip v.4.4
    

    If you cannot afford such change, you may try to skip the deprecated ABIs for build and packaging:

    android {
      defaultConfig {
        ndk {
          abiFilters 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        }
      }
    
      packagingOptions {
        doNotStrip '*/mips/*.so'
        doNotStrip '*/mips64/*.so'
      }
    }
    
    0 讨论(0)
提交回复
热议问题