简体   繁体   中英

platform-tools\aapt.exe directory missing in android SDK

I'm trying to get 'hello world' working on the Android SDK with Eclipse. I'm following this tutorial step by step:

http://developer.android.com/resources/tutorials/hello-world.html

but i'm returned the error "Error executing aapt. Please check aapt is present at C:\\android-sdk-windows\\platform-tools\\aapt.exe"

For some reason, the "platform-tools" folder does not exist under my installation. In its place I find "platforms" and "tools". Presumably, my SDK version is different to that used in the tutorial.

I can't work out what i need to change or update. Can someone please point me in the correct direction?

Thank you

Totally agree with izzy, but other times (usually on 64 bit OS machines or with multiple android platforms) when you install the latest SDK version the folder platform-tools had missing the "appt.exe".

To solve this you need to search on *android-sdk\\build-tools* folder and subfolders like \\build-tools\\17.0.0 in my case, and you will find aapt.exe, other necesary files and lib folder, just copy it everything to android-sdk\\platform-tools and it will be done.

sometimes you may get the error that it can not install because it can not create the temp folder to install the tools. You simply just need to run the SDK manager as administrator and this will allow it to all work out.

if we will face appt.exe issue (could not found) just Follow the below steps: 1. Just Read It( https://developer.android.com/studio/command-line/aapt2 )

  1. Navigate to (ctrl+find and search) com.android.tools.build > then go to aapt2 from this url ( https://dl.google.com/dl/android/maven2/index.html )

    1. Insert the version name you copied into the following URL and specify your target operating system: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/aapt2-version/aapt2-aapt2-version-[windows | linux | osx].jar For example, to download version 3.2.0-alpha18-4804415 for Windows, you would use: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.2.0-alpha18-4804415/aapt2-3.2.0-alpha18-4804415-windows.jar
  2. Extract the jar file, Change the name aapt2.exe to apt.exe

  3. Copy and paste into your android-sdk -> platform-tools

  4. Run the program, Issue will be get resolved

Note: Means you have to download and set the aapt.exe path in System Environment Variable

Run the Android SDK Manager and be sure that you have checked and installed Tools>Android SDK Platform-tools .

I believe this package is responsible for the folder in question here.

I just found aapt.exe file in my latest Android-SDK folder (Android_SDK\\build-tools\\28.0.3)

You can check your latest sdk build-tools folder
or
You can search on total Android SDK folder by file name

*What version of the SDK are you running? (1.5_r2 or something?)*

I would suggest updating your SDK and be done with it ;) You can do so trough the "Android SDK and AVD Manager".

Eclipse:
menu->window->"Android SDK and AVD Manager"

You might also want to change this setting:
menu->window->preferences->install/update->(expand)->automatic updates

I was able to delete my version (28.0.3) and Android Studio reinstalled it. The directory location was

C:\\Users\\YourUserName\\AppData\\Local\\Android\\Sdk\\build-tools

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM