Я пытаюсь внедрить сервисы Google Play в свою игру. Кроме того, я использую плагин AdInCube., Который отлично работает, но теперь у меня есть два файла AndroidManifest. Может в этом проблема? Я уже исправил одну ошибку (https://github.com/playgameservices/play-games-plugin-for-unity/issues/2028) путем повторного импорта пакета и принудительного разрешения. После этого я не могу собрать свою игру. Я получил ошибку:
Что пошло не так:
Не удалось выполнить задачу ': transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: повторяющаяся запись: com / google / android / gms / auth / api / signin /
Манифест GoogleServices:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application>
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003402577249840" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u0030.9.53" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
Манифест AdInCube:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.****.snake.101"
android:installLocation="preferExternal"
android:versionCode="9"
android:versionName="1.1.7">
<uses-permission android:name="com.android.vending.BILLING" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name="android.support.multidex.MultiDexApplication"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/UnityThemeSelector">
<activity
android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />
</activity>
</application>
</manifest>
Gradle:
buildscript {
repositories {
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
repositories {
maven {
url 'https://maven.google.com'
}
maven {
url 'http://repository.adincube.com/maven'
}
jcenter()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.adincube.sdk:AdinCube-Unity-3626ebe:2.3.1@aar') {
transitive = true
}
compile 'com.android.support:multidex:1.0.1'
**DEPS**
}
android {
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
defaultConfig {
targetSdkVersion '28'
minSdkVersion 14
multiDexEnabled true
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'
}
**SIGN**
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
**SIGNCONFIG**
}
}
packagingOptions {
exclude 'lib/armeabi/libadcolony.so'
exclude 'lib/armeabi/libjs.so'
exclude 'lib/arm64-v8a/libadcolony.so'
exclude 'lib/arm64-v8a/libjs.so'
exclude 'lib/x86_64/libadcolony.so'
exclude 'lib/x86_64/libjs.so'
}
}
dependencies {
compile ('com.adincube.sdk:AdinCube-Unity-3626ebe:2.+@aar') {
transitive = true
}
compile 'com.android.support:multidex:1.0.1'
}
repositories {
maven {
url 'https://maven.google.com'
}
maven {
url 'http://repository.adincube.com/maven'
}
jcenter()
}
android {
defaultConfig {
multiDexEnabled true
}
}
android {
packagingOptions {
exclude 'lib/armeabi/libadcolony.so'
exclude 'lib/armeabi/libjs.so'
exclude 'lib/arm64-v8a/libadcolony.so'
exclude 'lib/arm64-v8a/libjs.so'
exclude 'lib/x86_64/libadcolony.so'
exclude 'lib/x86_64/libjs.so'
}
}