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

前端 未结 5 2051

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:40

    I know this is old but just ran into this and the File -> Project Structure -> SDK Location - Android NDK Location setting was missing. Once I filled it in to the "Recommended" one it gradle sync'd fine

    0 讨论(0)
  • 2021-01-23 18:46

    Very strange, for me ndk version 22.0.7026061 indeed did not have a platforms directory. On my disk ndk version 21.1.6352462 had a platforms directory and setting

    ndk.dir=/home/username/Android/Sdk/ndk/21.1.6352462
    

    on local.properties solved the problems.

    0 讨论(0)
  • 2021-01-23 18:46

    ( android 5.3)We can solve it by removing android NDK plugin from your project. Go to setting ->plugin->android ndk support disable, click apply, click ok

    0 讨论(0)
  • 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/<username>/.local/android-sdk. Which means I can find the NDK at /home/<username>/.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/<username>/.local/android-sdk/ndk/20.0.5594570
    

    Adapt the path to where you have your NDK installed.

    0 讨论(0)
  • 2021-01-23 18:50

    Configuration on demand is an incubating feature. NDK is missing a "platforms" directory.

    If you are using NDK, verify the ndk.dir is set to a valid NDK directory.

    It is currently set to C:\Users\MSI\AppData\Local\Android\Sdk\ndk-bundle.

    If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

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