My android studio said it wanted to update. But when I did I tried to update it but it wouldn't work so I had to launch:
C:\Users\username\AppData\Local\Android\sdk\tools\android.bat to install other packages. But the NDK file wouldn't update, so I manually downloaded it from:
https://developer.android.com/ndk/downloads/index.html#download
Now I have this zip file and where should I extract the folder? Grateful for any help!!
The folder name is android-ndk-r13b.
Yes, rename the extracted folder android-ndk-r13b(probably the exact name will be outdated someday soon) to ndk-bundle (you can put the NDK [and SDK for that matter] anywhere, and leave the name alone if you want {do not do this, I'm sure seen one case of hard-coded sub-path}), then, make the settings point to the location where you put it.
Android Studio, File menu | Project Structure Ctrl+Alt+Shift+s(short-cut: ctrl+Alt+Shift+s):
It might also be helpful to you to set/check the following environmental variables:
NDK_HOME=C:\Android\sdk\ndk-bundle
NDK_MODULE_PATH=C:\Android\sdk\ndk-bundle
EXTRA stuff:
While were doing environmental variables (belt-and-braces for SDK):
ANDROID_HOME=C:\Android\sdk
For JDK:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
JAVA_PATH=C:\Program Files\Java\jre1.8.0_112\bin
JDK is the Java Development Kit.
JRE is the Java Run-time Environment.
If your tight on memory (RAM) for Gradle (700 Megabytes is about as low as you can go, other tools like monitor.bat use this variable too, it's ubiquitous) (clearly you want to make it as big a possible, without swapping making it extremely slow to build {note the underscore VERY important ! [it's a reserved name space conflict operator, don't ask me to explain it's VERY complicated !]}):
_JAVA_OPTIONS=-Xmx700m
Some Links
Setting up for Android NDK development
Add C and C++ Code to Your Project
Getting Started with the NDK
Using C and C++ Code in an Android App with the NDK
Download the .zip file. Start the installation through SDK manager. Go to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and copy .installer folder to desktop and cancel the downloading in SDK manager. Open .installer folder and open .installationdata file and check the folder in which the file is being downloaded like: %userprofile%\AppData\Local\Temp\PackageOperation01. Copy downloaded .zip file to the folder PackageOperation01 or whatever listed in .installationdata file. Now copy the .installer folder from desktop to %userprofile%\AppData\Local\Android\sdk\ndk-bundle and start the SDK manager and start the installation again for NDK. The SDK manager will start the installation skipping the download process.
In order to help those who are using MAC OSx, The process on MAC is as follows:
download ndk-bundle in zip format
run terminal
use below command to find your temp directory in mac (e.g. /var/folders/sp/31g4p3kd5l10c68qdy475krr0000gn/T/)
echo $TMPDIR
change directory to PackageOperation01
cd PackageOperation01
copy ndk-bundle.zip into the directory
cp /path/to/ndk-bundle.zip /$TMPDIR/PackageOperation01/
start Android Studio and in SDK-Manager try to install ndk-bundle again.
In Mac, With Android studio 3.3.2, SDK Manager keeps choosing new temporary folder to download the ndk-bundle. The following steps helped to install the downloaded ndk zip file.
Go to SDK manager, start downloading NDK.
Go to ~/Library/Android/sdk/ndk-bundle/.installer
cat .installData
path=/var/folders/vr/mz4hsqqs0wlgj9sfcpn3wfn5g2lwk3/T/PackageOperation07
PackageOperation0X is the temp folder chosen to download the zip file
Copy downloaded android-ndk-r21d-darwin-x86_64.zip to this temp folder (PackageOperation0X)
Copy ~/Library/Android/sdk/ndk-bundle folder to some other location
Cancel the NDK download in SDK Manager
cd ~/Library/Android/sdk/
You may find ndk-bundle folder missing as download has been cancelled in the SDK Manager.
Move the previously copied ndk-bundle to ~/Library/Android/sdk/
Go to SDK manager, start downloading NDK again. Existing file will be scanned and installation will be started skipping the download step.
Related
After I installed an older Unity version (5.6.0f3) I can't build a simple android app:
Unable to list target platforms. Please make sure the android sdk path
is correct. See the Console for more details. See the Console for
details.
As I understand I need Android tools 25.2.5 or earlier in order to build android apps in Unity 5.6.0f3.
According to this instruction I need just to add the path of the unzipped SDK to the Edit -->Preferences ---> External Tools --->SDK box. The problem is that after that Unity is not accepting this path and asks me to choose a different one.
While following this instruction, since I have a mac, I downloaded and unzipped the file and double-clicked android.bat and installed the recommended packages. But the problem remains, I still see the error message.
What might be the problem and how it can it be fixed?
Thank you in advance!
The reason Unity does not accept the path is because you are not linking the right folder for the sdk path. You may have to play around with the inner/outer folders of the sdk path in order to get it right.
On my mac the file path after installing the sdk is Library/Android/sdk (this is installed from Android Studio so that path may be a bit different).
And on my windows the correct folder is just the unzipped outer folder e.g tools_r25.2.3-windows
SDK / ADK: is the path to the folder that contains "platform-tools" folder (which contain ADB binary)
JDK: is the folder that contains the bin folder that contains java / javac (comipler) binary
NDK: download and unpack this massive ugly zip with 56k files in it. It should be version r13b - untiy doesn't like newer versions. No need to install anything
Thankfully for new versions of Unity assist you in managing those dependencies via the hub, but I am posting the screenshots for future reference as I often find myself looking for the very same answer
I installed the android studio today and I got a problem with the SDK manager:
I've followed this guide:
http://developer.android.com/sdk/installing/adding-packages.html
When I install the -
ARM EABI v7a System Image
I get this error. I tried to disable the antivirus but its still doesn't work. Hope for answers, thanks.
I have similar problems at my company with installations, also with android-studio and sdk. Usually run as admin solves most of those issues.
Close Android Studio or Eclipse.
Open folder "C:\Users\YourPC\AppData\Local\Android\sdk\tools"
Run "android.bat" as Administrator.
Now you can fix it.
In eclipse close eclipse and run android sdk manager as administrator
I had same problem. The solutions that i have done is as follows :
The problem is with temp folder in android sdk folder. i have changed the folder name from temp to temp1.
Now it is working properly for me.
I hope it will work for you also...
Delete TOOLS folder.
in temp folder there might a zip that you have downloaded. unzip it and copy tools folder and paste it in android sdk home folder.
For eclipse - Close the Android SDK Manager
Then - go to the directory - named where android-sdk are saved by default, by default, in my PC, the location is C:\Users\username\android-sdks.
In this folder, look for a temp folder and tools folder - make copy of tools folder beforehand. In temp folder, you will find zip folder similar like tools_R25.zip (I donot remember the exact name, but look for similar name), open the folder, inside you see a folder named tools -- now
Unzip the content of the tools folder inside android-sdks/tools, and start android SDK Manager again as administrator.
When I try to open up the SDK Manager in eclipse it says opening shortly, but never opens. I've tried to open the exe file but it displays an error message saying:
Failed to execute tools\android:bat the system cannot find the file specified
My path environment variable leads it to the tools folder.
This is the path:
C:\Users\Shan\Documents\Computer Science - YEAR 2\Android App Development\adt-bundle-windows-x86-20130917\sdk\tools
In my case the Tools directory just disappear.
..\sdk\tools
To solve it:
1) Just go to SDK zip -> adt-bundle-windows-x86_64-20131030.zip
2) Unzip the Tools Directory only.
3) copy it under ../sdk/
I had a similar problem today. Press the Windows button and Search for android.bat(in the search programs and files text field)
Then copy the file to your android SDK folder (C:\Users\Shan\Documents\Computer Science - YEAR 2\Android App Development\adt-bundle-windows-x86-20130917\sdk\tools\).
After that don't run SDK manager but run the android.bat file.
Hope this helps
-Zaniar
I had to move the AVD manager from /sdk/tools/lib to the root folder /sdk
Copy the AVD Manager.exe and SDK Manager.exe from
SDK_ROOT_FOLDER/tools/lib/
into
SDK_ROOT_FOLDER
I've been working with this problem for three days and finally was able to run SDK Manager by
==> Running the android.bat file as administrator
Note: I did not have to make any changes to the .bat file (such as setting the java_exe path) in order for the manager to run.
I saw this as a comment on the top answer but can't upvote yet, so confirming it here!
I cancelled an update to Android Tools and it seems there's a bug with unzipping the old (or new?) version back into {android_sdk}/tools. The zip is located in {android_sdk}/temp. Just unzip it into the right location and it should work again.
If the accepted answer doesn't help anyone, it also might be a permission issue (if the SDK is installed in Program Files (x86), for example, so try running android.bat as Administrator,
I had the same issue when updating the Android SDK Tools and SDK Platform-tools from the SDK Manager. I had to replace the tools folder with one located in a zip folder inside the temp folder.
In My case, While I installed visual studio 2015, The SDK files were missed and I am getting an error window shown below.
So I manually downloaded the tools from the following URL.
tools_r24.0.2-windows
Then extract the zip file and copy the tools folder in the following location.
C:\Program Files (x86)\Android\android-sdk
It worked for me.
I think current Android SDK only works with JDK x86 version. I search so much but when installed JDK x86 version Android SDK manager worked without problem.
Copy your android.bat file to C:\adt-bundle-windows-x86_64-20140702\sdk\tools folder or copy all files to C:\.
If you are seeing this error, it may be an issue with your COMSPEC environment variable.
Please see https://stackoverflow.com/a/27284746/3866013 for more details.
I had the same problem. Caused it myself because while runing Android SDK Manager i hit UNINSTALL SDK Tools.
I fixed the issue by running the installation of the Android SDK again. The installation folder had to be the same as previously. After the installation, everything was back again as it was.
This is how I solved the problem on Windows 7:
I was going to update the SDK using Android SDK Manager but android.bat was not found because previously it uninstall the older one and then installs new. In my case my SDK Update was interrupted i.e. in other words, could not install after the SDK Manager uninstalled the tools, so my machine was not able to find android.bat. What I did was just downloaded the standalone SDK tools to the same folder where my SDK were from :
http://developer.android.com/sdk/index.html#Other
https://developer.android.com/sdk/index.html#Other
Here are two options for downloading the Android SDK for Windows users. One in recommended option and the other is .zip file. Zip file worked well.
Another option may also work. Try searching android.bat with windows search engine. If you find the one, copy it and paste in SDK tools folder.
open Sdk Manager.exe, then i deleted first Android Sdk tools, so, I also appeared such a mistake, then I downloaded installer_r24.3.2-windows.exe, installing, copy C:\Users\Super Man\AppData\Local\Android\android-sdk\tools folder to my Sdk path,run My Sdk Path\android.bat ,ok!!
I did the following :
I created a folder SDK right below my C-drive
I unzipped tools_r25.2.3-windows.zip to C:\SDK
I moved SDK Manager.exe from C:\SDK\tools\lib to C:\SDK
I first ran SDK Manager.exe in 'normal mode',but this gave me the error, but when I ran SDK Manager.exe as ADMINISTRATOR it didn't return the error.
The reg command exists but for unknown reason my path variable was corrupted during some installation.
So some basic element were missing:
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem
I am installing 2.3.3 android API and i got this error:
Warning:
The following processes:
-cmd.exe
-java.exe
are locking the following directory:
C:\Program Files (x86)\Android\android-sdk\tools
Any help??
just go this dir:
C:\Program Files (x86)\Android\Android SDK\temp
and cut every thing was there then paste it in a new folder..
Run the Update again..
I got the same problem. Then I downoaded latest SDK (only the SDK. no need to download android platforms).
There's a folder call "tools" in "android-sdk" folder. I replaced the previous "tools" folder with newly downoaded "tools" folder. So far it's working in Eclipse.
I did better went to sdk/temp and found out
tools_r22.6.3-windows.zip which was downloaded but not installed
i just extracted the zip and replaced tools in \sdk\tools
note : exit eclipse and sdk manager , delete the old TOOLS folder rater than replacing it.
What worked for me is changing the name of the folder specified (C:\Program Files (x86)\Android\android-sdk\tools). After changing the name of the folder i opened android studio. next i went into the tools folder that i renamed and ran the android.bat file. this opened up the manager and allowed me to install no problem. A new tools folder will be created and used im assuming its safe to delete the old one that was renamed.
I received this error while the ddms was running (i was taking print screens from you phone). Exit and click Yes.
I have encountered this same problem and it has been solved.I configure the tools directory to the environment variable, This result can not rename the "tools" directory . solution: temporarily remove the environment variables inside, and then turn off the eclipse, and re-update.Hope it can help!
Go to C:\Program Files (x86)\Android\android-sdk and delete the temp folder. Rerun the SDK Manager to download the latest SDK's, it should work fine
You can go to:
C:\Program Files (x86)\Android\android-sdk
Delete the folder "tools."
Extract the zip that has been downloaded in C:\Program Files (x86)\Android\android-sdk\temp\tools_r21.1-windows.zip to C:\Program Files (x86)\Android\android-sdk. The folder inside this zip file is named "tools" and replaces the deleted folder.
It is the same as install the SDK Tools in the sdk manager.
I had this problem and it worked.
I "solved" it in this way: as said before, go to C:\Program Files (x86)\Android\android-sdk\temp and copy the content to a new folder. Extract the content of the zip file, which contains the new tools just downloaded, and copy the entire folder back to C:\Program Files (x86)\Android\android-sdk. This worked for me.
Download sdk from http://developer.android.com/sdk/index.html .Copy tools folder from the downloaded sdk folder and replace existing tools dir in already existing sdk folder. This worked for me. I face this issue while updating sdk. Upon copying and pasting the tools will not give any issue as you will be replacing updated version of tools to your existing sdk. This is not the right way as you need to do it all the time when you need to update sdk. Better way is to copy tools dir in ur sdk and paste it with diff name like toolsDiplicate in this folder run android.bat file as administrator. Hope this helps. Any other way to resolve this issue or any reasons for which we face this issue please let me know
I resolved this by copying my \tools folder, naming the copy \toolsCopy. Then I ran android.bat from the \toolsCopy folder with Administrator privileges.
Running the SDK manager from \tools locked the renaming of the \tools directory, for obvious reasons. SMH
Go to your android-sdk folder.
Rename 'tools' folder like 'tools1' or 'toolss' or anything else
Open cmd with Administration and go to that new renamed tools1/toolss folder from cmd
Ex-C:\Users\Eshad\AppData\Local\Android\android-sdk\toolss>android
Type 'android' for running the android.bat file
Now update
If you are on Windows instead of doing all those tricky things I solved it by downloading the 'sdk only' installer.exe which you can get here -> http://developer.android.com/sdk/index.html
1)Scroll down and click on DOWNLOAD FOR OTHER PLATFORMS
2)You will see two tables ADT bundle and SDK tools only .In that 'Sdk Tools only' one you can get the installer.exe(dont click on the .zip download) ... Just download it and run it but remember if you have saved your android in some other drive which is not the default then you will have to specify the path to the android sdk folder when the installer asks you to specify the path.
This solved my problem quit well without any problem.Cheers !!!
First go to folder where you have installed android SDK
( default location : *C:\Users\\AppData\Local\Android\android-sdk )
and rename the folder. ex : android-sdk-previousVersion
Then download the latest android SDK from https://developer.android.com/sdk/index.html?hl=i
Install the downloaded SDK in the same location of the previous android sdk.
Your downloaded sdk will not contain any platforms or system images..
Open the previous android sdk's folder and copy these folders : add-ons, build-tools, docs, extras, platforms, platform-tools ,samples ,sources and system-images then paste these folders in you new sdk's directory. Overwrite the folders if same folders exist.
Now you can delete the old android SDK folder.
Open the new android SDK and you will find all the platforms you had in the previous SDK.
go to Temp folder and untick the Read-Only tick button and press
I deleted the "temp" folder from the sdk folder and also the "temp" folder from the adt folder. It worked.
Deleting the the data from the temp folder which is inside the sdk folder is the best solution. Other solutions may work. You may have to try a lot of stuff....but ultimately, doing this will help you.
Go to your android-sdk folder.
Rename 'tools' folder like 'tools1' or 'toolss' or anything else
Open cmd with Administration and go to that new renamed tools1/toolss folder from cmd Ex-C:\Users\Eshad\AppData\Local\Android\android-sdk\toolss>android
Type 'android' for running the android.bat file
Now update
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)
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)
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
Extract the jar file, Change the name aapt2.exe to apt.exe
Copy and paste into your android-sdk -> platform-tools
Run the program, Issue will be get resolved
Note: Means you have to download and set the aapt.exe path in System Environment Variable
*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
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
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