I am using macbook. I have downloaded Android NDK & extracted it to
~/mytool/android-ndk-r10e
In .bash_profile I have set :
export ANDROID_HOME=~/Library/Android/sdk
export ANDROID_NDK_HOME = ~/mytool/android-ndk-r10e
My project pom.xml contains the following plugin:
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.3.0</version>
<extensions>true</extensions>
</plugin>
When I run mvn clean install, I got the following error:
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.3.0:ndk-build (default-ndk-build) on project MyTrackor: No Android NDK path could be found.
You may configure it in the pom using <ndk><path>...</path></ndk> or <properties><ndk.path>...</ndk.path></properties> or on command-line using -Dandroid.ndk.path=... or by setting environment variable ANDROID_NDK_HOME -> [Help 1]
The above error complains that no Android NDK path could be found, and it suggests me to set environment variable ANDROID_NDK_HOME to resolve the problem.
But as you see in my .bash_profile, I have already set the envrionment variable ANDROID_NDK_HOME. Why I still get this error ?
using line command to verify all exported variables
export
if you do no see ANDROID_NDK_HOME, that means you bash file has not been reloaded. then
source .bash_profile to reload the config.
else you see ANDROID_NDK_HOME, it may be another problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With