Error: Cannot run aapt

后端 未结 8 1836
借酒劲吻你
借酒劲吻你 2020-12-02 15:48

When I compile an android application ( I tried with the sample ones from the sdk). I get this error:

>Error executing aapt: Cannot run program \"/home/ro         


        
相关标签:
8条回答
  • 2020-12-02 16:21

    I had the same problem today, this helped me.

    Arch Linux 64bit.

    0 讨论(0)
  • 2020-12-02 16:22

    aapt is a 32 bit application and will fail on a 64 bit box until 32 bits are enabled and libs added

    This is current solution as of Ubuntu 16.04 / 17.10

    dpkg --print-foreign-architectures  #  if below was never run this returns nothing ... afterwards it will return : i386
    sudo dpkg --add-architecture i386
    sudo apt-get -qqy update
    sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
    
    0 讨论(0)
  • 2020-12-02 16:24

    I had this same problem today. If anyone from the future is having this problem, try the solution here

    Programs running aapt in android sdk from shell and from sbt

    0 讨论(0)
  • 2020-12-02 16:26

    Debian 7 Wheezy solution:

    sudo dpkg --add-architecture i386
    sudo apt-get update 
    sudo apt-get install ia32-libs
    
    0 讨论(0)
  • 2020-12-02 16:32

    Ubuntu 14.04.1 LTS solution:

    sudo apt-get update 
    sudo apt-get install gcc-multilib lib32z1 lib32stdc++6
    

    Reason: aapt needs 32-bit libraries installed

    0 讨论(0)
  • 2020-12-02 16:32

    SDK tools 24 has a bug, build will fail with the same error. Should be fixed in the new version, for now the workaround in tools/ant/build.xml place

    <property name="aapt" location="${sdk.dir}/build-tools/22.0.1/aapt" />
    <property name="aidl" location="${sdk.dir}/build-tools/22.0.1/aidl" />
    <property name="dx" location="${sdk.dir}/build-tools/22.0.1/dx" />
    <property name="zipalign" location="${sdk.dir}/build-tools/22.0.1/zipalign" />
    

    at the end of the xml in the root tag. Replace 22.0.1 with your build tools version

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