TROPHiT / UnityDeeplinks

A set of tools for Unity to allow handling deeplink activation from within Unity scripts
Apache License 2.0
103 stars 29 forks source link

Failed to build android #14

Open Calvin2274 opened 5 years ago

Calvin2274 commented 5 years ago

Hello~ I've just imported UnityDeeplinks into my projects, and created empty gameObject with attached UnityDeeplinks component into the scene. Also changed the android:name="com.trophit.MyUnityPlayerActivity".

However, it made me failed to make a build and shown error as follow:

CommandInvokationFailure: Gradle build failed. /Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[ D8: Program type already present: com.trophit.MyUnityPlayerActivity java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives

what happen to my projects and any idea to fix this ?

Ferhattepe commented 5 years ago

I have a solution but i am not sure. You have to delete Unity Deep links.jar. Then You can get build.

rennard commented 5 years ago

I'm getting the same error, Unity 2019.1.11f1. I've tried rebuilding the .jar file but to no avail, I've not made any changes to the code just added a .cs deep link handler.

mrmaffen commented 4 years ago

deleting the .jar fixed it. thanks