android maven error log:Could not find tool 'dx.jar' and Could not find tool 'aapt'

1.error

[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:dex (default-dex) on project gauges-android: Execution default-dex of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:dex failed: Could not find tool 'dx.jar'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]



fixed



 



image



reinstall  Android sdk plateform-tools,checked it,ok,checked it,ok.



then clean project,reopen eclipse.



if error not fixed,then



copy folder android sdk\build-tools\android-x.x\lib to android sdk\platform-tools\lib



2.error



[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources (default-generate-sources) on project gauges-android: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]



fixed:



copy android sdk\build-tools\android-x.x\aapt.exe to android sdk\platform-tools\

Comments

Popular posts from this blog

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3

Global can earn money wordpress blog Advertising Alliance Introduction–1 BidVertiser

pkrss发布