Android Hello-World compile error: Intellij cannot find aapt

后端 未结 13 1906
感情败类
感情败类 2020-12-02 09:45

I\'m trying to get set up with an Android development environment using IntelliJ in Ubuntu 12.04. I create an Android Application Module, but when I try to build, I get the

相关标签:
13条回答
  • 2020-12-02 10:08

    Goodlife once again. Just incase of such an error clean project and you are good to go.

    0 讨论(0)
  • 2020-12-02 10:11

    It appears that the latest update to the r22 SDK release moved aapt and the lib jar from the platform-tools to the build-tools directory. While we wait for JetBrains to release an update, here's a quick fix using a couple of symbolic links:

    From your AndroidSDK/platform-tools directory, run the following:

    ln -s ../build-tools/17.0.0/aapt aapt
    ln -s ../build-tools/17.0.0/lib lib
    

    ...and IntelliJ should be able to compile as normal.

    0 讨论(0)
  • 2020-12-02 10:14

    Clone the android-maven-plugin on GitHub and install it in your repo

    git clone https://github.com/jayway/maven-android-plugin.git
    cd .../maven-android-plugin/
    mvn clean install

    Then update your pom to use version 3.5.4-SNAPSHOT of the plugin. Everything should work properly !

    0 讨论(0)
  • 2020-12-02 10:15

    update your IntelliJ to 12.1.4 by using beta releases as the update channel enter image description here

    0 讨论(0)
  • 2020-12-02 10:15

    i solve it with this to line commands

    ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/aapt ~/Programs/android-sdk-linux/platform-tools/aapt
    ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/lib ~/Programs/android-sdk-linux/platform-tools/lib
    
    0 讨论(0)
  • 2020-12-02 10:17

    In Windows it is enough to copy only aapt.exe, lib\dx.jar and dx.bat

    from build-tools\android-4.2.2

    to

    platform-tools

    0 讨论(0)
提交回复
热议问题