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

北慕城南 提交于 2019-12-04 03:28:45

问题


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


回答1:


*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




回答2:


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.




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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



来源:https://stackoverflow.com/questions/5727301/platform-tools-aapt-exe-directory-missing-in-android-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!