I am a noob with android development. What is android.jar? I am referring to https://developer.android.com/guide/platform/?nav=true and trying to understand which layer it fits into. I heard conflicting opinions and am now really confused, considering my limited knowledge in Android. Thanks!
there are 2 android.jar:
The first one is the android.jar in the computer. This is a JAR file. It is provided by gradle in the classpath. It contain the Android framework classes. It 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. By default, all calls to the provided Android.jar throw exceptions, this allows you to write tests that do not depend on any Android platform behavior.
Once you application is deployed on the device it will use the android.jar JAR file on the Android device (The second one). I couldn't find any source that said android.jar is here. I think android.jar fit better in the "Java API Framework" layer.
Sources:
https://codelabs.developers.google.com/codelabs/android-testing/index.html?index=..%2F..android-training#5
https://www.cnblogs.com/larack/p/4501078.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With