Could not find tool aapt. Please provide proper Android SDK directory path as configuration parameter

前端 未结 6 518
春和景丽
春和景丽 2021-02-01 23:30

I am trying to build a android project using maven. But when I run : mvn clean install I get the following error:

Execution default-generate-sources of goal com.jay

6条回答
  •  一生所求
    2021-02-02 00:23

    In the last release of android sdk directory structure has changed. Build tools like aapt or dex has been moved from platform-tools to build-tools directory. Support for new directory structure was added in maven-android-plugin version 3.6.0 but you use version 3.4.1. Changing plugin version to 3.6.0 in pom.xml must help. Here is snippet from my pom.xml:

            
                com.jayway.maven.plugins.android.generation2
                android-maven-plugin
                3.6.0
                
                    src/main/other/AndroidManifest.xml
                    src/main/resources
                    src/main/java
                    
                        17
                        /opt/android-sdk/
                    
                    
                        true
                    
                
                true
            
    

提交回复
热议问题