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
Related
so I've downloaded the Android Studio IDE from the official website, installed, and run it. When I try to create a new project this is what I get:
Obviously I click on (open SDK manager):
I then click on (Edit):
At first, the directory /Android/SDK was totally missing, so I added it manually by creating the two folders Android and SDK in the directory C:\Users\Sam\AppData\Local\ . Which led to the line "target folder is neither empty nor does it point to an existing SDK installation". The SDK manager was never Installed, I couldn't find it in the directory mentioned. Therefore, I downloaded the SDK tools and put it in the directory specified, but that didn't work. An SO thread has suggested that I don't have enough storage space for the SDK, but I have almost 31GB of empty space on my C:\ drive, another one has suggested that I have a proxy/ http problem but I don't think that this is the problem here since I've downloaded the IDE with no problems.
After I hit next this is what I get:
Now how could the SDK could be is up to date while there isn't any SDK to be seen?
I'd appreciate some help, have a nice day
this error may arise when your sdk folder not a 'platforms' folder and you must make an empty folder and rename it to 'platforms'. platforms folder must be in the sdk folder.
I downloaded SDK installers alone and solved the problem. One site to get the installers is: SDK Installer
Android Studio does not start on my machine with a warning about unsufficient memory. So I want to work on Android apps with Qt Creator. Unfortunately Google decided to make it harder to just get the Android SDK and refers to Android Studio, so all older tutorials link to dead pages or to pages that are redirected to the Android Studio website.
So what are the steps needed to install the plain SDK, the NDK and enable Qt Creator for Android development?
I documented the steps I took to make it work and will post them in an answer hoping they will be halpful for other people as well.
This is how it works in February 2017.
Download the Android SDK command line tools from the link at the bottom end of https://developer.android.com/studio/index.html
Unzip. Note that you need to leave the folder name untouched (tools/), otherwise it will not work. I have it unpacked as /usr/local/Android/android-sdk/tools creating the folders Android/ and android-sdk/ and then unzip into android-sdk/.
Run ./android from the tools/ folder. A GUI is spawning where you can select SDK stuff to be installed. Of course there is also a newer version of the SDK tools available than the one you just downloaded two minutes ago. ;)
Select the Android version of your device (you can probably deselect the Intel-based sub packages and Android TV stuff from that version, so check the contents of the packages you select. If in doubt, install them, though. :) ... The installation process will take some time.
Download the Android NDK from https://developer.android.com/ndk/downloads/index.html
Unzip. According to my SDK tools folder, I chose to unzip the NDK into /usr/local/Android/ as android-ndk/.
In Qt Creator go to the Settings dialog (Tools -> Settings...) and there to Devices -> Android and fill in the locations of your SDK and NDK. Note: for the SDK you need to state the folder containing the tools/ folder, not the tools/ folder itself. So for me:
/usr/local/Android/android-sdk
/usr/local/Android/android-ndk
Add some SDK and NDK paths to your shell's rc file, e.g. ~/.bashrc or ~/.zshrc:
export PATH=$PATH:/usr/local/Android/android-sdk/tools
export PATH=$PATH:/usr/local/Android/android-sdk/platform-tools
export PATH=$PATH:/usr/local/Android/android-ndk
Now you should be good to go. ... For me on one system the QtCreator kits were created automatically on another they weren't. Not sure why. If needed, you can create the kits manually and be done. :)
So, I've been trying to build a project in LibGDX for about 10 hours now. In case you'r unfamiliar, LibGDX is one of those platforms where you specify a project directory at the start, along with any required SDKs and then when you're ready to start coding it will generate a project for you.
Anyway, I've been having a problem where every time I try to build it fails with the single error message:
Execution failed for task :core:compileJava.
Could not find tools.jar
I'm guessing "tools.jar" is a package within the Android SDK, as this is the only repository needed to build, it doesn't ask for a JRE or even the Java SDK. just the Android SDK.
I have been looking in the SDK manager, I have installed all of the packages labelled "Android-SDK Tools", "Android-SDK Platform Tools" and "Android SDK Build Tools" but there is nothing else that includes "tools.jar", I am looking for some light shed on this topic as it is a very grey area. I would like to know where this .jar file comes from and what exactly it includes. Can it be installed from the Android SDK?
There have been similar questions like this before which only fit narrow situations, If someone could provide a holistic description of the tools.jar package it would benefit a great deal for me and everyone else that needs it in their 3rd-party android IDEs.
For the record, it's building with Gradle and my current SDK is well-equipped enough to build full-fledged apps in Android Studio.
Please don't answer this question with a question unless I have left out some information that is dire to finding an adequate solution
Try copying tools.jar from %JAVA_HOME\lib to Android Studio\lib
For me, copying tools.jar to Android lib folder alone didn't solve my problem.
But I also had to create a System Variable 'JAVA_HOME' in Windows Environment Variables with path to the latest JDK folder.
Restarted Android Studio, and this solved by problem.
My Android Studio Version: 4.2.1
The "tools.jar" is provided by Oracle JDK which is required by android studio for compilation - I have faced this issue after updating android studio to latest version in my PC.
To Resolve the issue follow below steps:
In Android studio File -> Project Structure -> SDKs (Under Platform Settings)
A) Add JDK path by pressing '+' symbol in middle pane if suppose JDK/JDK home path is not present in the middle pane already (Middle pane also contains the Downloaded Android SDK's)
B) Java sdk will be usually present/installed in the path
64 bit => "C:\Program Files\Java\jdk1.X.Y_ABC" (In my PC it is 1.8.0_202) or
32 bit => "C:\Program Files (x86)\Java\jdk1.X.Y_ABC"
If suppose you don't have JDK installed in your PC, please download and install from Oracle Java website
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Set JDK and JRE Path(Download both from webpage mentioned in step 2) in system environment variable
A) Press windows key type "Edit the system environment variables" and open the application
B) Go to Advanced -> Environment Variables
Under system variables add JAVA_HOME and JRE_HOME as below
Set Windows system environment variable
Add jdk lib path on the Path environment variable under user variables (this step is required only if the error not resolves with the previous steps)
C:\Program Files\Java\jdk1.X.Y_ABC\lib
In my case, I have five jdk and some have tools.jar and other not, my solution is copy paste this tools.jar in all lib of jdk.
Nothing worked for me. So I Copied tools.jar and pasted it in C:\Users\UMAR_\AppData\Local\Android\Sdk\platforms\android-30 which is the path to the library for the Android API 30 Platform. I pasted tools.jar in every folder and it start working.
I didn't have tools.jar initially but followed this link and downloaded https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Also added to a environment variable.. but what worked was in the first para, I still don't know if adding to variable was necessary or not.
I want to integrate some c code with Android so as first step I has to specify NDK path in Native Development node. But when I specify NDK path it gives error Invalid path for NDK
I googled but could not find some solution. Am I missing some step.
SDK and NDK are in the same folder and SDK path working fine.
Please help
I have installed
make-3.81
nawk-2007.10.23-setup
Cygwin
ADT-17.0.0
Sequoyah
android-ndk-r7b-windows.zip (Extracted)
EDIt:
I just check the link and came to know that it could be GCC absent problem .How do I check that if its GCC problem or not , or How can I check if GCC is installed or not?
Mmm... weird error. Keep in mind that in order to use the NDK, the SDK should be working in perfect way before you start with the NDK, said that, I suggest you to try the following:
1- Be sure you have the pre-requisites:
For all development platforms, GNU Make 3.81 or later is required.
Earlier versions of GNU Make might work but have not been tested.
A recent version of awk (either GNU Awk or Nawk) is also required.
For Windows, Cygwin 1.7 or higher is required. The NDK will not work
with Cygwin 1.5 installations.
2- Start from scratch again by deleting any NDK references such as the settings on eclipse, paths, folders, zips, etc.
3- Be sure you have updated to the latest Android SDK and ADT Tools. Using the Help->Check for Updates Menu in ECLIPSE and then be sure you have all the things are up to date on the Android SDK Manager.
4- I see a "D:/" on your question, so you're using a Windows PC... it must be a Windows XP (32-bit) or Vista (32- or 64-bit). Be sure to get the Windows version (http://dl.google.com/android/ndk/android-ndk-r7b-windows.zip), and when you have unzipped that ndk, rename the folder to "ndk". You can put it next to where your SDK's folder is, it should not matter.
5- Open Eclipse, and give it the path to the NDK, and see what happens.
Good luck!
I exhuasted to solve this problem "Invalid path for android SDK" but it got solved at last.
Here is how it got solved.
My system specs: P4 3.2 GHz, Windows 7 32-bit, Eclipse Standard Edition 4.3 (Kepler).
Other supporting softwares: MinGW with GNU make 3.81.
Problem (first the problem I faced and then the solution):
I downloaded Android NDK latest version from "developer.android.com/sdk/ndk/index.html" which was "android-ndk-r9-windows-x86.zip". Then I extracted it in C:\ directory then I added a ";C:\android-ndk-r9" in my PATH variable. Then I installed "Sequoyah Android Native Code Support" using eclipse "install new software" option (Help ➤ Install New Software➤type "Indigo - http://download.eclipse.org/releases/indigo" in the work with field ➤ go to Mobile and Device Development category and select Sequoyah Android Native Code Support).
Then I went to eclipse menu "Window ➤ Preferences ➤ Android ➤ Native Development" and entered "C:\android-ndk-r9" in the NDK location and got error " Invalid path for NDK".
Solution: I search exhaustively on internet and tried different solution but the solution worked for me was:
I downloaded the older version of NDK ( download link: "dl.google.com/android/ndk/android-ndk-r7c-windows.zip" ) and extracted in C:\ directory using winrar and updated the PATH in environment variable to point to the new NDK version 7c. When now I entered the path it accepted. No error appeared.
the problem is Sequoyah doesn't accept new version because it has not updated since 2011 ( I'm not sure)
Note1: for Linux users download link: "dl.google.com/android/ndk/android-ndk-r7b-darwin-x86.tar.bz2"
Note2: you can change the version in the link according to your requirement for example "dl.google.com/android/ndk/android-ndk-r4bc-windows.zip" to download version 4b.
Thanks.
Try to create a new systems variable called "NDK" and set its value to the NDK path.
Check your path to the NDK-- this has, on more than one occasion been the issue for me, at least with the SDK. (Not NDK in my instance) I know that, for instance, at the moment my NDK path is ~/android-ndk-r6/android-ndk-r6/
Also, to install gcc in windows, you must install Cygwin or such compatible gcc setup for windows. (The docs here say that it is required, but I think I may have heard of people using some slightly different implementation.) Cygwin works well for me, but you may need to specify gcc, make, and so on, in the installer as packages to be downloaded and set up on your machine, so read your installation options carefully. If you find that you have more packages that need to be installed, you can run the setup.exe program again and install them in-place.
In addition, here (at the bottom of the page) you can find an installation guide for the NDK in case you run into further issues.
Hope some file is missing in your ndk folder, so that it is unable to identify the ndk folder. Download ndk again and load it, otherwise update the native development plugin...
You said SDK and NDK are in same folder. It could be a conflict with the route. Try this:
Uninstall NDK
Reinstall NDK at D:\ecpspace\NDK\android-ndk-r7b
Create new PATH on enviroment var
Restart computer
On linux work for me, i had 2 ndks installed in different routes, and when i used eclipse, was compiling using the other one, and don't worked as i wanted.
This might sound dumb, but did you download the correct package? I had the same problem on linux until I realized I was trying to use the Windows version (I had downloaded it earlier while I was trying to install it on a different computer with cygwin). I downloaded the linux package and everything worked.
I've only been at this for a couple of days, but in my brief experience, the NDK and eclipse do not play well together. I would suggest moving to the command line for the NDK portion of the project for the time being. Some good tutorials can be found at:
http://www.cmumobileapps.com/2011/08/31/compiling-open-source-libraries-with-android-ndk-part-1/
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/
I have similar bug (Eclipse Version: Indigo Service Release 2, Build id: 20120216-1857). The main problem was in Sequoya plug-in. Problem disappear when I update Sequoya to the latest version.
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