Can I set the ndk.dir out of the sdk.dir path, why there is no ndk.dir automatic creation?

霸气de小男生 提交于 2020-01-06 05:45:29

问题


I fetch a project from Windows to my local Mac environment.

You see there, under the Gradle Script, the local.properties:

ndk.dir=D\:\\sdk\\ndk-bundle
sdk.dir=/Users/lisa/software/android-sdk-macosx

you see there has the ndk.dir and sdk.dir, the latter is my new Mac SDK path, but the ndk.dir did not change now. from the D\:\\sdk\\ndk-bundle, whether we know the ndk-bundle should be under the sdk path(/Users/lisa/software/android-sdk-macosx)?

but in the /Users/lisa/software/android-sdk-macosx, there is no that directory:

lisa-MacBook-Pro:android-sdk-macosx ldl$ pwd
/Users/lisa/software/android-sdk-macosx
lisa-MacBook-Pro:android-sdk-macosx ldl$ ls
SDK Readme.txt  build-tools platforms   sources     temp
add-ons     platform-tools  skins       system-images   tools

Whether I should create the /Users/lisa/software/android-sdk-macosx/ndk-bundle? and set ndk.dir?

can I set the ndk.dir anywhere, such as out the sdk.dir path?


回答1:


As of gradle plugin 3.5, the behavior is closer to what you're describing: https://developer.android.com/studio/projects/install-ndk

ndk.dir is deprecated, and the NDK will normally come from the SDK directory. You can select the exact version you want with the android.ndkVersion gradle property, or it will select a default. If you specify ndk.dir I believe that will override, but that is the obsolete workflow.




回答2:


I solved this problem disabling NDK Support in Settings>Plugins>Android NDK support.



来源:https://stackoverflow.com/questions/57752390/can-i-set-the-ndk-dir-out-of-the-sdk-dir-path-why-there-is-no-ndk-dir-automatic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!