how to add target build in eclipse? - android

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.

Related

How to update Google.Play.Services.Maps to 32.961 or higher?

https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils
I am trying to use that nuget for my xamarin forms android map. However it depends on Google.Play.Services.Maps to be version 32.961 or higher but my current version is 29.0 and when I try to update it I need to update lots of packages (Support.Design, Support.v4 etc) and visual studio is not letting me update that either. I believe it's something about the MonoAndroid version. I get this error message You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework.
Any ideas how I can successfully install this nuget?
Xamarin Forms changed the way it depends on the Android support libraries a few versions ago.
You can see in the NuGet package (I have 2.3.4.247 installed) that MonoAndroid v1.0 requires Android support libraries to be equal to 23.3.0, but MonoAndroid v7.0 requires the version to be greater than or equal to 23.3.0.
To update the Android support libraries you need to ensure you have the latest Android SDK installed in the Android SDK manager, then change the Compile using Android Version (Target Framework) on the Application tab of the project options to be Use Latest Platform, and the Target Android Version on the Android Manifest tab to be Use Compile using SDK version.
Once you have done this you should be able to update the support libraries. I did that by selecting Xamarin.Android.Support.v4 and updating in NuGet.

Upgrading the SDK to a newer SDK

I have an app running on android 2.1 and I would like to update it to android 3.2 as I do not have anyone using that version. How do I go about doing that? I changed the min sdk in manifest but I was wondering about the JAR file. Do I download the jar for that version. Do I keep the old jar.
Thanks
Prerna
It doesn't matter what the Android version is of the jar file. That is only what target the application compiles with. If you want to change that, click on your project, File -> Properties -> Android and check the desired project build target (i.e. 3.2) and Apply.

Android SDK build tools

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

How to add jar in Eclipse to update the version ?

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!").

How to properly add an Android library to a previously made Android project?

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......

Categories

Resources