yasirkula / UnityIonicIntegration

A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
104 stars 32 forks source link

ERROR: Manifest merger failed: Attribute application @ debuggable #60

Closed sofiasalder closed 4 years ago

sofiasalder commented 4 years ago

Hello! I am using ionic 3.9.5, Unity 2019.1.14, Android Studio 3.5.1 and Vuforia 8.3.8. I have followed all the steps and at the end when I want to run, I get this error: ERROR: Manifest merger failed: Attribute application @ debuggable value = (true) from manifestMerger6218032392116407953.xml: 7: 18-43 is also present at [: VuforiaWrapper:] AndroidManifest.xml: 14: 18-44 value = (false). Suggestion: add 'tools: replace = "android: debuggable"' to element at manifestMerger6218032392116407953.xml: 7: 5-9: 19 to override. Then I add tools: replace = "android: debuggable" to the Manifest as Android Studio suggests and gives me many more errors. I tried with a Unity project without Vuforia and I get duplication of bitter.jnibridge.JNIBridge classes even though I deleted unity-classes.jar from the libs folder of the android module. Any ideas how to solve this please? Thank you

yasirkula commented 4 years ago

If the "Suggestion: ..." part is clickable, clicking it should automatically adjust the AndroidManifest. What are the full error messages when the AndroidManifest issue is resolved?

sofiasalder commented 4 years ago

It is not clickable. I added tools: replace = "android: debuggable" manually and doesn´t worked :(

yasirkula commented 4 years ago

If one of your AndroidManifest.xml files contains android: debuggable in it, try removing that attribute.

sofiasalder commented 4 years ago

Not any, that's why I find the error weird

sofiasalder commented 4 years ago

Hi! Finally get to work. I had to commet one dependency in build.gradle of my Unity Project. Now looks like: dependencies { implementation fileTree(dir: 'libs', include: ['.jar']) //implementation(name: 'VuforiaWrapper', ext:'aar') } And my build.gradle's dependencies of my App looks like: dependencies { implementation fileTree(include: '.jar', dir: 'libs') // SUB-PROJECT DEPENDENCIES START implementation project(path: ':CordovaLib') implementation 'com.android.support:support-annotations:27.1.1' implementation project(':UnityProject') implementation files('../UnityProject/libs/unity-classes.jar') implementation files('../UnityProject/libs/VuforiaWrapper.aar') // SUB-PROJECT DEPENDENCIES END }

yasirkula commented 4 years ago

Wow, I'm almost sure that this required numerous trial and errors. Great job! 😃

sofiasalder commented 4 years ago

Thank you! Now I have problems when I run the application with ionic cordova run android. (With Android Studio it runs well). But with ionic, I managed to run by copying the unity-classes.jar library back into the libs app folder that I had previously deleted, and when I try to open the unity scene from my device, the application is broken, I suspect it is because of that " repeated library ", but without it, the program does not run from ionic. I have added the lines in GradleBuilder.js as Issue # 1 suggests but it doesn't work. If you have any suggestions on how to solve this, it will be helpful.

yasirkula commented 4 years ago

I have always used Android Studio to build and run my apps, so I have no experience with ionic run command, sorry.