Android.jar version

Hello Guys,
I saw that there is an android.jar file included in the lib folder. This file was added 4 years ago.
My question - what is the purpose of this file? was it taken from the Android SDK? Can I replace it with a newer version?
I’m in the process of modifying the jme3-android module and I would like to use the latest android components

Thanks,
Adi

It depends on what api you’re targeting. Old versions will have reached their EOL and won’t get updated, hence the time stamp.

what if I want to replace that “android.jar” with a newer version? what is the way to do that?
It seems I cannot simply replace the old jar with a newer one. I tried that and it didn’t recognize the Android classes .
How does JME3 binds itself to a specific Android version?

Your grade build file determines what version of android api you use. Don’t replace libraries directly like that. They will be overwritten anyway when you clean and build. Set your dependencies correctly in your grade build files.

I looked at the various gradle files and didn’t find any Android SDK version setting like I’m used to with a regular Android project. What’s more - the android.jar library is part of the source code on github so it seems that JME3 is using some kind of “hard-code” android version…
Which gradle file are you talking about?

I must be mistaken about the android jar. It must be some kind of intermediate binding api. I can’t get on my pc right now to look for myself, but the android grade setting can be found here:

https://developer.android.com/studio/build/#settings-file

I’m pretty sure that “android.jar” was taken from some specific old Android SDK. What I don’t understand is why replacing it with a newer one doesn’t work. I went through the gradle settings & build configs and I can’t find the way to upgrade it.
There is something fundamental I’m missing here… :slight_smile:

I want to update that I found a GitHub repository containing all platform versions of android.jar files. It appears that these files are not identical to the ones provided by the Android SDK so it explains why I couldn’t use them as-is.
When I finish doing my upgrade and check that everything works as expected, I would like to know how to suggest an upgrade to the old android.jar found in the lib folder of jmonkey engine.

Thanks!

Why, though? It works. There is nothing seemingly wrong with it that would lead to your wanting to update it. It works, it doesn’t contain any bugs that you are aware of. It may very well be that it hasn’t been updated because there’s no need.

Sure it works fine but I have a requirement for recording an mp4 video out of the jme3 running scene and Android has that built-in support for codecs & media recorder just from API 18, 21 and above.
I’m adding a recordable surfaceview to the engine and I’ll be glad to contribute that back to the community

Then just set the Android api version in grade as I said a few posts back.