Open abeldantas opened 5 years ago
The error itself is
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\user\ionic-spike\Export\UnityProject\libs\unity-classes.jar
I don't have Ionic installed at the moment so I can't verify your screenshot but you just need to delete android/jniLibs/unity-classes.jar
. No other unity-classes.jar related action is needed.
No unity-classes.jar
show up in any jniLibs
folder, so I'm guessing this has nothing to do with duplicated unity-classes.jar
. That was the suggestion on this possibly related issue: https://github.com/yasirkula/UnityIonicIntegration/issues/46
The screenshot I added above shows all the unity-classes.jar
I have in the project, none of them are in a jniLibs
folder.
This seems to be different. Additionally I get 2 slightly different errors each time I run the app:
Type com.unity3d.player.f is referenced as an interface from com.unity3d.player.UnityPlayer.
And
Type com.unity3d.player.d is referenced as an interface from com.unity3d.player.Camera2Wrapper.
To be clear, the project sync with gradle files without issues, this only happens when I try to run the app.
@yasirkula what gradle version and unity version are you using?
Some steps in the README are slightly different due to gradle version (like using implementation) so I want to try the same version that you're using.
I built the Unity project via Android Studio and it works. I built the ionic project with the plugin (ionic cordova plugin add https://github.com/yasirkula/UnityIonicIntegration.git) but without integrating the Unity project and it works.
What's failing is adding the unity project as a dependency.
For me, jniLibs directory was there while browsing the project files in Android mode. Example image:
I can't remember my Gradle version but despite using implementation
, there should be no other difference. Neither can I remember the Unity version(s), sorry. There has been quite some time since I last worked with Ionic.
If you can't find unity-classes.jar inside jniLibs, then try deleting all unity-classes.jar files except the one inside Export/UnityProject.
No
unity-classes.jar
show up in anyjniLibs
folder, so I'm guessing this has nothing to do with duplicatedunity-classes.jar
. That was the suggestion on this possibly related issue: #46The screenshot I added above shows all the
unity-classes.jar
I have in the project, none of them are in ajniLibs
folder.This seems to be different. Additionally I get 2 slightly different errors each time I run the app:
Type com.unity3d.player.f is referenced as an interface from com.unity3d.player.UnityPlayer.
AndType com.unity3d.player.d is referenced as an interface from com.unity3d.player.Camera2Wrapper.
To be clear, the project sync with gradle files without issues, this only happens when I try to run the app.
The same error to me now. Build without any errors, just show when run the app.
Oh... I solved it. 🍡
How did you resolve the issue?
How did you resolve the issue?
Android/app/libs and untityProject/libs folder have unity-classes.jar. Delete one. Rebuild project then I can run the app.
Dex error while processing unity-classes.jar This is on a minimal unity project.
These are the unity-classes.jars I have:
They all are where they need to be, right?
Any tips deeply appreciated.