How to disable NDK for a certain project in Android Studio

前端 未结 1 1257
盖世英雄少女心
盖世英雄少女心 2020-12-06 20:11

I have multiple projects I\'m working on, and some require NDK to be installed. When I do that in the SDK manager, all my non-NDK projects fail to generate the APK unless I

相关标签:
1条回答
  • 2020-12-06 20:44

    cannot run mips64el-linux-android-strip

    This is a known problem, which happens when you have the latest NDK r.17 and don't 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
    

    The workarounds include using NDK r.16 or excluding the mips strips *)

    packagingOptions {
        doNotStrip '*/mips/*.so'
        doNotStrip '*/mips64/*.so'
    }
    

    *) as @Forgen correctly updated, packagingOptions was not available for Android gradle plugin earlier than v.2.3. But if you are still using such version, you have problems much more serious than mips64, and should upgrade ASAP.

    0 讨论(0)
提交回复
热议问题