任务':transformClassesWithJarMergingForRelease'

时间:2018-11-08 13:33:37

标签: android unity3d google-play-services

我正在尝试在我的游戏中实现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>

等级:

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'
  }
}

0 个答案:

没有答案