I'm a Unity developer. I came across a problem when I am working on building an Android APK, and here is what happened:
I have to use some third party native android libraries in my project, and each of these are provided with a .jar (only includes source files) and a project folder (includes manifest, res, assets and proguard file and so on). But when I am building APK, I got stopped by the "65k fields limit".
I removed some libraries and managed to build the APK. But I decided to figure out what happened, so I decompiled the APK, checked the sources and found all the R.java files in the APK are the same except the package name, which seems like each dependent project keeps a copy of the merged version of R.java file (The merged R file has 2000 fields and ten dependencies make 20000 fields).
The removed libs are also essential to my APK, so I have to solve this problem first. I wonder if there is any way in which I can prevent the duplication of merged R.java in each lib project?
Sorry for my bad english..