Downgrading from 2.0 alpha to 1.3

Since I had too much difficulties with the 2.0 alpha I decided to downgrade to 1.3. But now, when I want to build on 1.3 I get the following error:

/Users/rolandvigh/Migeran-1.3/moe/natj/natj/src/main/native/natj/NatJ.cpp:353 DEBUG: Method ‘boolean java.lang.reflect.Method.isDefault()’ is not accessible.
5 Zip: Found duplicate entry java/security/security.properties
5 Zip: Error adding entry to hash table -5
System 6 Unable to open boot classpath entry: /Users/mikiswohrmann/Library/Developer/CoreSimulator/Devices/0E84DCDB-EA39-4D50-A5BA-7F9C1327EE9F/data/Containers/Bundle/Application/FACEE57D-CBBA-4D08-853F-36B98EFF6A3A/GoetheApp.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:264)
at apple.NSObject.(NSObject.java:66)

I read about this in another thread: Hi,how to make the ipa smaller? but there seems to be no solution. I tried, as recommended, to delete the build folder etc. Nothing solved it. Creating a new project with 1.3 works just fine. But I can’t downgrade my project on 2.0-alpha which is very bad. I could copy the classes and setup everything in a new project but that would be a lot of work. So I want to ask if theres a solution to this problem that is not that much work.

Any help appreciated!

Hi,

It is hard to debug the issue without having access to the actual code.

You need to check which resources are duplicated in application.jar and why.

Please also make sure that you downgrade to the latest 1.3.12 version and run

./gradlew moeUpdateXcodeSettings -Pmoe.forced.update

from the command line before building it.

Best Regards,
Gergely

Thank you for your response,

the application.jar in the build directory seems to only contain a security.properties file. I am not sure what you mean. Could you please go into detail.

Thanks in advance
Mikis Wöhrmann

A little #push.

Still have the same issue. Can’t find the problem about the duplicate entry.

Hi,

Could you please share your app (or a test project that exhibits the issue)? It would make it way easier to reproduce the problem and see what is going wrong there.

Thank you,
Gergely

I decided to create a new project on 1.4 and implement what I got so far into it. This way I can have a clean project again. But now I get a strange problem generating the bindings:

binding error

No idea what is going on.

Hi,

this is a known issue with 1.4, we are looking into it. Despite this error message, the bindings should be generated correctly.

Best Regards,
Gergely