2017-04-19 78 views
0

我使用windows unity 5.6.0f3。試圖使用最新的firebase和facebook SDK 7.9.4進行登錄。團結運行很好。但不幸的是,一旦我嘗試構建android APK,它將得到如下錯誤。我安裝了最新的Java並通過重複的jar文件進行搜索,但仍然沒有運氣。Unity:firebase和Facebook for Android

如果我失去了一些東西,請注意我。有任何人有這個問題?

CommandInvokationFailure: Unable to convert classes into dex format. 
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Users/Alex/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "E:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" - 

stderr[ 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/BuildConfig; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanMr2; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle; 
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$1; 

UNEXPECTED TOP-LEVEL EXCEPTION: 
java.lang.RuntimeException: Translation has been interrupted 
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613) 
    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:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at SDKMain.main(SDKMain.java:129) 
Caused by: java.lang.InterruptedException: Too many errors 
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605) 
    ... 9 more 
] 
stdout[ 
processing archive E:\UnityProject\TooTiToo\Temp\StagingArea\android-libraries\animated-vector-drawable-23.4.0\libs\.\classes.jar... 
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat.class... 
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$1.class... 
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableCompatState.class... 
processing android/support/graphics/drawable/AnimatedVectorDrawableCompat$AnimatedVectorDrawableDelegateState.class... 
processing android/support/graphics/drawable/animated/BuildConfig.class... 
processing archive E:\UnityProject\TooTiToo\Temp\StagingArea\android-libraries\appcompat-v7-23.4.0\libs\.\classes.jar... 
ignored resource .readme 

回答

0

感謝從火力的意見,我終於明白jar文件爲什麼不同的名稱,但仍可能會發生衝突。

我發現文件是 support-annotations- ??文件和支持-v4- ??文件被複制。

只需刪除舊版本,現在就可以工作。