FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

Getting warning “NDK is missing a 'platforms” directory.' with no NDK [duplicate] #92

Open marcialwushu opened 6 years ago

marcialwushu commented 6 years ago

I've got a project that only uses the Android SDK, not the NDK, but I'm getting warnings whenever I build with gradle about the NDK:

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 /usr/local/opt/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.

Seems like a pretty clear warning. I'm not using the ndk, so there is no ndk-bundle in my android-sdk. The issue is that I don't have an ANDROID_NDK_HOME set, and my local.properties file (which appears to be generated by Android Studio) doesn't set the NDK:

sdk.dir=/usr/local/opt/android-sdk

I do have an ANDROID_HOME environment variable:

ANDROID_HOME=/usr/local/opt/android-sdk

System is a mac, but we seem to get the same issue in Docker. Anyone know how to get rid of this warning?

marcialwushu commented 6 years ago

Sounds like maybe updating SDK from Android Studio IDE could help

Steps are:

marcialwushu commented 6 years ago

Just install the Android NDK.

That fixed my error and warning!