I didn't find the "android.jar" file too

35 views
Skip to first unread message

Alfredo Suárez

unread,
Feb 27, 2012, 12:15:05 AM2/27/12
to java-ide-droid
Hello Tom,

I have Android SDK 4.0.3 downloaded, in Asus Transformer tablet, but i
didn't find a Java File "android.jar" too. Can you be more specific
where find this file?

Thanks

Alfredo

Tom

unread,
Feb 27, 2012, 4:32:14 AM2/27/12
to java-id...@googlegroups.com
Sorry, I did not download this SDK, so I don't know exactly where the file might be.

Just a warning:
If you use the SDK 4 then you might use features (API 15) that are not available in previous SDKs and your app will not work on devices with Android < 4
That's why I use the android.jar for API Level 8. If the app builds, it will work an all devices with Android >=2.2
http://developer.android.com/guide/appendix/api-levels.html

Tom

MSquare

unread,
Mar 14, 2012, 2:17:36 PM3/14/12
to java-ide-droid
Alfredo, I was wondering myself about android.jar. Even more so since
the description page mentions that android.jar can be found on
download page. On the download page there is NO android.jar, but there
are android libraries for different platforms. I have used those (pick
one) and even renamed it into android.jar (maybe that's not necessary)
and it worked. Hope this helps!

Jonathan Lengsavath

unread,
Dec 13, 2012, 4:42:31 AM12/13/12
to java-id...@googlegroups.com
So, i'm kinda new to this. just installed the latest v1.7.1 of the app and was wondering upon setting it up, i read that all you need is the android.jar(i chose the latest one api11, unsure if it's the correct one or not as im on android JB 4.1.2 on my nexus s) Also, do i need to extract all the files from the androidSDK folder over to my phone? i did not see anywhere on the tutorial saying so.

Tom

unread,
Dec 14, 2012, 3:52:23 AM12/14/12
to java-id...@googlegroups.com
Hello Jonathan

Your decision about which version of android.jar you use has two consequences:
1. The higher the version, the more current the API is and the more functionality you can use in your apps.
2. If you use functionality that is "too" new, many users will not be able to use your app, because their Android version is too old and does not support this new functionality.

In AndroidManifest.xml you can specify what the minimum API level must be for your app (android:minSdkVersion).
In Google Play users will only be shown apps if the Android version of their device is the same or higher than the minSdkVersion of the apps.
Unfortunately, there is no way for the compiler to know which functionality belongs to which API level. So, it cannot warn you if you use functionality which is not available in the minSdkVersion.

Since I want my apps to run on as many devices as possible, I choose the OLDEST android.jar which fits the needs of my app - usually android-api8.jar
By telling the compiler to use this android-api8.jar (instead of a newer one), I can make sure that when I use functionality of API 9 or higher, I will get a compilation error.

Except for the android.jar you do not need any other stuff from the Android SDK.

Tom

Tom

unread,
Dec 14, 2012, 3:53:26 AM12/14/12
to java-id...@googlegroups.com
You do not need to extract the files of android.jar
Reply all
Reply to author
Forward
0 new messages