NDK is missing a “platforms” directory. while trying to build

前端 未结 5 2112

Executing tasks: [clean]

Configuration on demand is an incubating feature. NDK is missing a \"platforms\" directory. If you are using NDK, verify th

5条回答
  •  情书的邮戳
    2021-01-23 18:48

    This probably happens because Android Studio will automatically download the latest version of NDK which doesn't have a platforms directory (No idea why! Would be awesome if someone can clarify that).

    This is what worked for me. Using the SDK manager. That is the icon in the top right corner of Android Studio that looks like this . Go to SDK Tools tab. In the right bottom corner, enable Show Package Details and install NDK version 20.0.5594570 (You can remove the newer version that was installed automatically by Android Studio to save space).

    Note that the NDK will be installed in the location shown in Android SDK Location. For me that is set to /home//.local/android-sdk. Which means I can find the NDK at /home//.local/android-sdk/ndk/20.0.5594570/

    Hit apply and when it's done go to file called local.properties and add this.

    ndk.dir=/home//.local/android-sdk/ndk/20.0.5594570
    

    Adapt the path to where you have your NDK installed.

提交回复
热议问题