Question

I have an Android project and it depends on one jar file. In order for the app to run, I need to export the jar to APK. The jar will be dexed and classes in the jar will be packaged up into the apk.

Now I want to move this jar to framework: meaning modifying framework.jar and put my classes in it:

I move framework.jar back to Android device. When I compile my Android app, I don't need to export my .jars anymore.

My question is: Will those files still be dexed and account for number of dexed methods?

Was it helpful?

Solution

These classes will not be included in your app .dex file and will not count against the number of dexed methods. However, they will be dexed and count against the limit for the framework.jar.

Edit: As @JesusFreke mention in a comment, methods in framework.jar you invoke will be counted against the .dex method limit. However, an app rarely uses all classes and methods in a framework, so there will still be substantial savings.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top