Cannot build Google Development Project
I am able to successfully test on my android device via "Build and Run" in Unity 5.3.5. I am able to export the unity project to Android Studio.
However, when I run the android studio project, it gives me numerous errors. The first was solved by adding the following to the .gradle file:
multiDexEnabled true
Now I have come across the problem of:
Error:Execution failed for task ':fishDiver:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/unity/purchasing/amazon/BuildConfig.class
My gradle file is as such:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.sink.fish"
minSdkVersion 9
targetSdkVersion 19
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':amazonAppStore')
compile project(':googleAIDL')
compile project(':googlePlay')
compile project(':common')
compile project(':unityadsrelease')
compile files('libs/unity-classes.jar')
}
Can anyone point me in the right direction? I have not added anything extra, only the Unity IAP API and the Unity Analytics API. But other then that it is a pretty basic build and it is not working!