• Почему возникает "CommandInvokationFailure: Unable to convert classes into dex format" при сборке в unity3d?

    @RoboTTexHuk Автор вопроса
    stderr[
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/MapCollections$ArrayIterator;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/MapCollections$KeySet;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/MapCollections$ValuesCollection;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/Pair;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/Pools;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/MapCollections$EntrySet;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/DebugUtils;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/SimpleArrayMap;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/ArrayMap;

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at SDKMain.main(SDKMain.java:129)
    Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)....... и.т.
  • Имеется два плагина для unity3d в кажом пагине есть AndroidManifest, как обьеденить эти два манифеста что бы не было ошибок при сборке под Android?

    @RoboTTexHuk Автор вопроса
    Denis Gaydak: А вы не посоветуете, что делать если манифесты не мержутся правильно, один плагин работает другой нет, может точку входа создать в основном манифесте что бы учитывались activity всех плагинов? P.S Я их разместил в папке Assets/Plugins/Android/(Папки с названиями)
  • Имеется два плагина для unity3d в кажом пагине есть AndroidManifest, как обьеденить эти два манифеста что бы не было ошибок при сборке под Android?

    @RoboTTexHuk Автор вопроса
    Первый AndroidManifest:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest
        xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.playfab.pushtestapp"
        android:installLocation="preferExternal"
        android:theme="@android:style/Theme.NoTitleBar"
        android:versionCode="1"
        android:versionName="1.0">
    
        <supports-screens
            android:smallScreens="true"
            android:normalScreens="true"
            android:largeScreens="true"
            android:xlargeScreens="true"
            android:anyDensity="true"/>
    
        <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14"/>
    
        <!-- Android GCM Plugin -->
        <permission android:name="com.playfab.pushtestapp.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <!-- //Change to your package name .permission.C2D_MESSAGE -->
        <uses-permission android:name="com.playfab.pushtestapp.permission.C2D_MESSAGE" /> <!-- //Change to your package name .permission.C2D_MESSAGE -->
        <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.GET_ACCOUNTS" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <uses-permission android:name="com.android.vending.BILLING" />
        <!-- Android GCM Plugin -->
    
        <application
            android:allowBackup="true"
            android:label="@string/app_name"
            android:isGame="true">
          
            <!-- Unity Activities -->
            <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
                android:launchMode="singleTask"
                android:label="@string/app_name"
                android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name="com.unity3d.player.UnityPlayerActivity"
                android:launchMode="singleTask"
                android:label="@string/app_name"
                android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
            </activity>
            <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
                android:launchMode="singleTask"
                android:label="@string/app_name"
                android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
                <meta-data android:name="android.app.lib_name" android:value="unity" />
                <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
            </activity>
            <!-- End Unity Activities -->
    
            <!-- Begin GCM -->
            <receiver
                android:name="com.google.android.gms.gcm.GcmReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                    <!-- for Gingerbread GSF backward compat -->
                    <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                    <category android:name="com.playfab.pushtestapp" />  <!-- //Change to your package name -->
                </intent-filter>
            </receiver>
    
            <service android:name="com.playfab.unityplugin.GCM.PlayFabGcmListenerService" android:exported="false">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                    <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                </intent-filter>
            </service>
    
            <service
                android:name="com.playfab.unityplugin.GCM.PlayFabInstanceIDListenerService"
                android:exported="false">
                <intent-filter>
                    <action android:name="com.google.android.gms.iid.InstanceID"/>
                </intent-filter>
            </service>
            <service
                android:name="com.playfab.unityplugin.GCM.PlayFabRegistrationIntentService"
                android:exported="false">
            </service>
            <service
                android:name="com.playfab.unityplugin.PlayFabUnityAndroidPlugin"
                android:exported="false"
                android:stopWithTask="true">
            </service>
    
            <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
          
            <!-- End GCM -->
    
            <!-- Begin IAP -->
    
            <!-- End IAP -->
        </application>
    
    </manifest>


    Второй AndroidManifest:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
      <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
      <application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
        <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>
        <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity android:name="com.facebook.LoginActivity" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
        <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
        <activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
        <activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
        <activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
        <activity android:name="com.facebook.unity.AppInviteDialogActivity" />
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb196200774085518" />
        <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider196200774085518" android:exported="true" />
        <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="@string/app_name" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
      </application>
    </manifest>