I am develop game with libgdx. and make ipa use robovm is 20M, but use the moe, the ipa is 43.9M. Only for iphone, not ipad. I use the
proguardLevel ‘app’
if i use the ‘all’, my app will crash.
My question is how to make the ipa smaller?
I am develop game with libgdx. and make ipa use robovm is 20M, but use the moe, the ipa is 43.9M. Only for iphone, not ipad. I use the
proguardLevel ‘app’
if i use the ‘all’, my app will crash.
My question is how to make the ipa smaller?
You should use proguardLevel 'all'
for production builds, that will give you the smallest size. If your app crashes with all
then some class gets removed in this configuration that should not be removed, e.g. it is only invoked through reflection. The missing class should be mentioned in your crash log, you should add it to your proguard.append.cfg
file.
That said, currently the MOE runtime is bigger than the RoboVM runtime, so the final IPA will be somewhat larger than with RoboVM. We know this is an important topic, and it is on our TODO list to make the size of the runtime smaller.
Launching:
art I 2786 824122 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /var/containers/Bundle/Application/147A57CF-3167-4FE0-B828-C5AA06A6EFE5/ios-moe.app/application.jar:/var/containers/Bundle/Application/147A57CF-3167-4FE0-B828-C5AA06A6EFE5/ios-moe.app
5 Zip: Found duplicate entry android/database/CursorWindow.aidl
5 Zip: Error adding entry to hash table -5
System 6 Unable to open boot classpath entry: /var/containers/Bundle/Application/147A57CF-3167-4FE0-B828-C5AA06A6EFE5/ios-moe.app/application.jar
System 6 java.io.IOException: Duplicate entries in archive
at java.util.jar.StrictJarFile.nativeOpenJarFile(Native Method)
at java.util.jar.StrictJarFile.(StrictJarFile.java:61)
at libcore.io.ClassPathURLStreamHandler.(ClassPathURLStreamHandler.java:57)
at java.lang.VMClassLoader.createBootClassPathUrlHandlers(VMClassLoader.java:48)
at java.lang.VMClassLoader.(VMClassLoader.java:31)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:373)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:849)
at java.lang.ClassLoader.loadClass(ClassLoader.java:480)
at libcore.reflect.InternalNames.getClass(InternalNames.java:53)
at java.lang.Class.getDexCacheType(Class.java:521)
at java.lang.reflect.Method.getReturnType(Method.java:173)
at java.lang.Class.getDeclaredMethods(Class.java:717)
at org.moe.natj.objc.ObjCRuntime.registerClass(Native Method)
at org.moe.natj.objc.ObjCRuntime.doRegistration(ObjCRuntime.java:73)
at org.moe.natj.general.NatJ.register(NatJ.java:265)
at apple.NSObject.(NSObject.java:65)
I don’t understand how to do.
Thank you for reply. I use the ‘all’, but the size of ipa is 31.6m, It is also too big for me. And the most important thing is make the size of runtime smaller, i think. so I have to use the robovm fork with my this game, and I have to write framework bindings by myself,
Keep in mind that the App Store should slice up the game automatically per architecture, so only the architecture is downloaded from the App Store that matches the device. A rough estimate of the download size: (IPA_SIZE - (size of assets)) / 2
Looking at your crash log: for some reason this android.database.CursorView.aidl got twice into your app’s jar file. The weird thing is that it should not be there even once. We will look into this and get back to you.
OK, Thank you very much
Hi,
could you please try to delete the contents of the build folder and try again? It should solve this duplicate resource problem.
Best Regards,
Gergely
Hi, just now. I delete all the build directory in the project. and build, run. It also crash by same error.
Hi,
Which Gradle version are you using? We tested the build logic numerous times and we never saw this kind of error with the new build system.
Can you share your project in a private message? We would like to take a look to see why this can happen.
Best Regards,
Gergely
Total time: 12.196 secs
➜ colorball ./gradlew -version
Build time: 2016-07-18 06:38:37 UTC
Revision: d9e2113d9fb05a5caabba61798bdb8dfdca83719
Groovy: 2.4.4
Ant: Apache Ant™ version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)
OS: Mac OS X 10.12 x86_64