If i have two or more version of android sdk build tools as shown below then when which one will be chosen by the eclipse while building. IS it anything to with the SDK platform chosen for developing apk.
Here which one will be used either 17 or 19?
The build tools specifies the toolchain used to build Android projects. In Eclipse you can change which version is used with the project.properties file by specifying sdk.buildtools, e.g.
sdk.buildtools=17.0.0
You will probably never need to do that, as it will use the most recent installed version by default. It is not tightly coupled to the SDK version, and has only been recently split apart from the SDK itself (since version 17).
If there are different versions for Android SDK Build Tools , By default eclipse uses the most recent version of the Android Build Tools.
But if your project requirement belongs to different version(may be older) , you can do this using following steps.
In the root folder of your application project, find the project.properties file.
Open the file and specify the Build Tools version by adding a build-tools property on a separate line:
e.g. sdk.buildtools =17.0.0
I currently have an Android project in Eclipse.
I need to change target build in Project properties
but there is only Android 4.4 in the list
how can i add another target ? for example 2.1 or 2.2
In the list it only shows the SDKs that you have installed. If you want to build application with a specific version then in SDK manager download the SDK first and then use that for making a build.
Generally we make build only with the latest version. Why do you want to make a build with other version? If you want to support older version like 2.2 then you have to set that in minSdkVersion in your manifest file.
I made my app for Android 4.3 and I'm almost done with that but now I want to upgrade it for Android 4.4.
Will it work by adding android.jar ?
Steps to perform it.
Download latest version of android i.e Andriod 4.4 (API 19) using Android SDK manager.
Right Click your Project -> Properties -> Android -> Select desired API level
Update your Android Manifest file with min, max and target SDK support
You can not change android.jar file directly. You need to perform step 2 to do so.
No, it will not work ... you need to update the SDK with Android SDK manager first. Then update the Eclipse ADT plugin and then go to your Android project, set the Android project build path to 19 and change the targetSDK to 19 as well in the Manifest.
The android.jar JAR file does not contain the Android framework code, but only stubs for the type signatures, methods, types, etc. The android.jar JAR file is only used for the Java compiler before deployment on an Android device. It is not bundled with your application. Once your application is deployed on the device / emulator, it will use the android.jar JAR file on the Android device. Calling methods from the android.jar JAR file throw a new RuntimeException("Stub!").
I downloaded Android Studio, fixed the JDK Environmental Variable, but when I try to create a New Project, I get an error that says
Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.
I opened up android.bat in the SDK but it said I was already running version 22.
Anyone else getting this?
It just happened because you already have your SDK setted up for Android Developers Bundle with eclipse. Simply open your SDK manager in the ADT Bundle and update you Android SDK Tools from 21.1 to 22 and you are good to go.
Worked for me.
First of all, on Windows and Mac, the individual tools and other SDK packages are saved with the Android Studio application directory.
Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
Mac: /Applications/Android\ Studio.app/sdk/
Make sure your android-sdk-path is correct and the sdk tool version is 22 or later.
Then open the Configure--> Project Defaults --> Project Structure, set your project sdk is Android SDK.
enjoy.
As for me, I make next:
Start Eclipse -> start SDK -> install selected packages
Eclipse -> Help -> check for updates -> update all
Android Studio -> configure -> Project Defaults -> Project structure -> Press plus -> Android SDK -> put path to the same sdk that you use in eclipse (run SDK and in top panel you can see this path).
Apply
I did all of the above and still got the ....missing templates blah blah. What worked for me was to go to Configure>Project Defaults>Project Structure>Project and select Android SDK, then Configure>Project Defaults>Project Structure>SDKs map the Android SDK home path to the sdk folder in the ADT bundle (for me it was C:\Users\home\Toolbox\adt-bundle-windows-x86\sdk).
I then selected Android 4.1.2 clicked apply and it worked.
I then went back to the Configure>Project Defaults>Project Structure>SDKs and then selected Android 4.2.2 and now that worked too (strange though as when I selected Android 4.2.2 first time the Apply button was grayed out)
I ran into this problem because I wanted to update from an old version. In doing this, I downloaded the latest version from the Project Tools Site, then unzipped and copied over my existing Android Studio install which did have the sdk folder inside.
Going back and looking at it, I see quite plainly that there was a note that I previously ignored:
NOTE: These .zip files do not contain an embedded SDK install. If you have an existing install of Studio which contains an embedded SDK, if you upgrade by installing one of these zips, make sure you copy over the SDK as well.
For OS X users, this means going to your old version of Android Studio (if you haven't copied over it yet) and right-clicking and selecting Show Package Contents, then copying the sdk folder that's inside, then putting that into the new version of Android Studio.
If, like me, you already copied over the old version, then you'll need to redownload the old version first which does contain the SDK.
They released a new sdk today. You need to update to it.
I was still hitting this, and figured it was due to something I had misconfigured (which turned out to be the case). The error message is a little confusing, too, because I believe that they are referring to is the version of the ADT tools, not the SDK. For example, the version of Android 4.3 (which is about the latest) is 18.
As of the latest source for Android Studio (which you can clone from here: https://android.googlesource.com/platform/tools/adt/idea), that message is generated from NewProjectWizard.java at about line 75 if TemplateManager.templatesAreValid() is false. And it checks that by looking for the existence of the file [rootTemplatesFolder]/gradle/wrapper/gradlew .
It gets the [rootTemplatesFolder] from the SDK(s) you specified in the "Project Structure" settings for default projects. In my case, I had several specified - both the new ones pointing to the sdk directory that's (thankfully) part of the Android Studio, and a few old ones I had somewhere else. I should not have included the old ones at all, but I'm a newb to this and the GUI let me do it. The NewProjectWizard was checking the tools area of that one first, which did not have that file, since the tools version with it was older than version 22.
I had to use dtruss to watch the system calls of Android Studio to see where it was looking for that file, at which point I could tell what my silly problem was.
I have a few more notes on this, including a screenshot of my particular misconfiguration, at http://www.nowherenearithaca.com/2013/08/solved-android-studio-and-your-android.html
Note: It seems you have to restart Android Studio for the "New Project Settings" here to take effect.
for ubuntu:
Open sdk manager from Android Studio or configuration.
make sure you download or update the latest release SDK and build tools.
Set the sdk location as (your android folder/sdk)
It'll download and install sdk
just Update sdk with sdk manager
it worked for me
I'm trying to add a 2.2 sdk to my project and can't seem to figure out how. I tried adding it as an external JAR in the Android sdk folder but ive encountered some errors. How could I add another Android sdk to a previously made Android project?
What you're trying to do is change the SDK version that you're project is targeting. You do not do this by including another jar in your project, you do it by changing the target SDK and minimum SDK for you project. Take a look here on how to do that and for more information:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
You can't add an SDK to a project, but you can set your project to use a different SDK. To do this, you need to edit the properties of the project (Right-click on the project head in eclipse, and select "Properties"). You can change the SDK to any that you have downloaded through the eclipse plugin.
Note that if you want to support different levels of SDKs, you need to have your project targeted for the lowest of the two platforms. For instance, if you want your project to be compatible with both 1.6 and 2.2, you need to set your project target SDK to 1.6.
An alternative to this would be to create 2 different versions of your application and release them to market.
its simple
right on properties of a project
select android on left side menu
change the sdk version
thats it......