0

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)?

enter image description here

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?

user7693832
  • 6,119
  • 19
  • 63
  • 114
  • see https://stackoverflow.com/a/57706250/8034839 if it helps – shizhen Sep 02 '19 at 06:41
  • 1
    Yes, you can put NDK anywhere, but if you let the SDK Manager install NDK for you, it may be easier to maintain. The file `local.properties` is not expected to be copied from one computer to another. – Alex Cohn Sep 02 '19 at 10:27

2 Answers2

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.

Dan Albert
  • 10,079
  • 2
  • 36
  • 79
-1

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

Jason Aller
  • 3,541
  • 28
  • 38
  • 38