Unable to convert classes into dex format (Unity + PlayFab + Facebook)
I'm developing a multiplayer game using Unity 5 and PlayFab. Now I have an error when I integrate Facebook API. I've tried using Facebook API in another project and it works fine.
Here is an error.
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.8.0_31\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:\Users\ThePriefy\AppData\Local\Android\android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
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/accessibilityservice/AccessibilityServiceInfoCompatIcs;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorListenerCompat;
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
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)
... 9 more
]
stdout[
processing archive D:\Documents\[CPE403] Senior Project 2\ParticleShot 15 Mar2016 15.02\ParticleShot 20160316 14.26 Win-Lose\Temp\StagingArea\android-libraries\cardview-v7-23.1.1\bin\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource android/
ignored resource android/support/
ignored resource android/support/v7/
ignored resource android/support/v7/cardview/
processing android/support/v7/cardview/BuildConfig.class...
ignored resource android/support/v7/widget/
processing android/support/v7/widget/CardView.class...
processing android/support/v7/widget/CardViewApi21.class...
processing android/support/v7/widget/CardViewDelegate.class...
processing android/support/v7/widget/CardViewEclairMr1.class...
processing android/support/v7/widget/CardViewEclairMr1$1.class...
processing android/support/v7/widget/CardViewImpl.class...
processing android/support/v7/widget/CardViewJellybeanMr1.class...
processing android/support/v7/widget/CardViewJellybeanMr1$1.class...
processing android/support/v7/widget/RoundRectDrawable.class...
processing android/support/v7/widget/RoundRectDrawableWithShadow.class...
processing android/support/v7/widget/RoundRectDrawableWithShadow$RoundRectHelper.class...
processing archive D:\Documents\[CPE403] Senior Project 2\ParticleShot 15 Mar2016 15.02\ParticleShot 20160316 14.26 Win-Lose\Temp\StagingArea\android-libraries\facebook-android-sdk-4.9.0\bin\classes.jar...
ignored resource META-INF/
ignored resource META-INF/MANIFEST.MF
ignored resource com/
ignored resource com/facebook/
processing com/facebook/AccessToken.class...
processing com/facebook/AccessToken$1.class...
processing com/facebook/AccessToken$2.class...
processing com/facebook/AccessToken$AccessTokenCreationCallback.class...
processing com/facebook/AccessToken$AccessTokenRefreshCallback.class...
processing com/facebook/AccessTokenCache.class...
processing com/facebook/AccessTokenCache$SharedPreferencesTokenCachingStrategyFactory.class...
processing com/facebook/AccessTokenManager.class...
processing com/facebook/AccessTokenManager$1.class...
processing com/facebook/AccessTokenManager$2.class...
processing com/facebook/AccessTokenManager$3.class...
processing com/facebook/AccessTokenManager$4.class...
processing com/facebook/AccessTokenManager$RefreshResult.class...
processing com/facebook/AccessTokenSource.class...
processing com/facebook/AccessTokenTracker.class...
processing com/facebook/AccessTokenTracker$1.class...
processing com/facebook/AccessTokenTracker$CurrentAccessTokenBroadcastReceiver.class...
processing com/facebook/BuildConfig.class...
processing com/facebook/CallbackManager.class...
processing com/facebook/CallbackManager$Factory.class...
processing com/facebook/FacebookActivity.class...
processing com/facebook/FacebookAuthorizationException.class...
processing com/facebook/FacebookBroadcastReceiver.class...
processing com/facebook/FacebookButtonBase.class...
processing com/facebook/FacebookButtonBase$1.class...
processing com/facebook/FacebookCallback.class...
processing com/facebook/FacebookContentProvider.class...
processing com/facebook/FacebookDialog.class...
processing com/facebook/FacebookDialogException.class...
processing com/facebook/FacebookException.class...
processing com/facebook/FacebookGraphResponseException.class...
processing com/facebook/FacebookOperationCanceledException.class...
processing com/facebook/FacebookRequestError.class...
processing com/facebook/FacebookRequestError$1.class...
processing com/facebook/FacebookRequestError$Category.class...
processing com/facebook/FacebookRequestError$Range.class...
processing com/facebook/FacebookSdk.class...
processing com/facebook/FacebookSdk$1.class...
processing com/facebook/FacebookSdk$2.class...
processing com/facebook/FacebookSdk$3.class...
processing com/facebook/FacebookSdk$4.class...
processing com/facebook/FacebookSdk$InitializeCallback.class...
processing com/facebook/FacebookSdkNotInitializedException.class...
processing com/facebook/FacebookSdkVersion.class...
processing com/facebook/FacebookServiceException.class...
processing com/facebook/GraphRequest.class...
processing com/facebook/GraphRequest$1.class...
processing com/facebook/GraphRequest$2.class...
processing com/facebook/GraphRequest$3.class...
processing com/facebook/GraphRequest$4.class...
processing com/facebook/GraphRequest$5.class...
processing com/facebook/GraphRequest$6.class...
processing com/facebook/GraphRequest$7.class...
processing com/facebook/GraphRequest$Attachment.class...
processing com/facebook/GraphRequest$Callback.class...
processing com/facebook/GraphRequest$GraphJSONArrayCallback.class...
processing com/facebook/GraphRequest$GraphJSONObjectCallback.class...
processing com/facebook/GraphRequest$KeyValueSerializer.class...
processing com/facebook/GraphRequest$OnProgressCallback.class...
processing com/facebook/GraphRequest$ParcelableResourceWithMimeType.class...
processing com/facebook/GraphRequest$ParcelableResourceWithMimeType$1.class...
processing com/facebook/GraphRequest$Serializer.class...
processing com/facebook/GraphRequestAsyncTask.class...
processing com/facebook/GraphRequestBatch.class...
processing com/facebook/GraphRequestBatch$Callback.class...
processing com/facebook/GraphRequestBatch$OnProgressCallback.class...
processing com/facebook/GraphResponse.class...
processing com/facebook/GraphResponse$PagingDirection.class...
processing com/facebook/HttpMethod.class...
processing com/facebook/LegacyTokenHelper.class...
processing com/facebook/LoggingBehavior.class...
processing com/facebook/Profile.class...
processing com/facebook/Profile$1.class...
processing com/facebook/Profile$2.class...
processing com/facebook/ProfileCache.class...
processing com/facebook/ProfileManager.class...
processing com/facebook/ProfileTracker.class...
processing com/facebook/ProfileTracker$1.class...
processing com/facebook/ProfileTracker$ProfileBroadcastReceiver.class...
processing com/facebook/ProgressNoopOutputStream.class...
processing com/facebook/ProgressOutputStream.class...
processing com/facebook/ProgressOutputStream$1.class...
processing com/facebook/RequestOutputStream.class...
processing com/facebook/RequestProgress.class...
processing com/facebook/RequestProgress$1.class...
processing com/facebook/TestUserManager.class...
processing com/facebook/TestUserManager$Mode.class...
ignored resource com/facebook/appevents/
processing com/facebook/appevents/AppEventsConstants.class...
processing com/facebook/appevents/AppEventsLogger.class...
processing com/facebook/appevents/AppEventsLogger$1.class...
processing com/facebook/appevents/AppEventsLogger$2.class...
processing com/facebook/appevents/AppEventsLogger$3.class...
processing com/facebook/appevents/AppEventsLogger$4.class...
processing com/facebook/appevents/AppEventsLogger$5.class...
processing com/facebook/appevents/AppEventsLogger$6.class...
processing com/facebook/appevents/AppEventsLogger$7.class...
processing com/facebook/appevents/AppEventsLogger$AccessTokenAppIdPair.class...
processing com/facebook/appevents/AppEventsLogger$AccessTokenAppIdPair$SerializationProxyV1.class...
processing com/facebook/appevents/AppEventsLogger$AppEvent.class...
processing com/facebook/appevents/AppEventsLogger$AppEvent$SerializationProxyV1.class...
processing com/facebook/appevents/AppEventsLogger$FlushBehavior.class...
processing com/facebook/appevents/AppEventsLogger$FlushReason.class...
processing com/facebook/appevents/AppEventsLogger$FlushResult.class...
processing com/facebook/appevents/AppEventsLogger$FlushStatistics.class...
processing com/facebook/appevents/AppEventsLogger$PersistedAppSessionInfo.class...
processing com/facebook/appevents/AppEventsLogger$PersistedAppSessionInfo$1.class...
processing com/facebook/appevents/AppEventsLogger$PersistedEvents.class...
processing com/facebook/appevents/AppEventsLogger$SessionEventsState.class...
processing com/facebook/appevents/FacebookTimeSpentData.class...
processing com/facebook/appevents/FacebookTimeSpentData$1.class...
processing com/facebook/appevents/FacebookTimeSpentData$SerializationProxyV1.class...
processing com/facebook/appevents/FacebookTimeSpentData$SerializationProxyV2.class...
ignored resource com/facebook/applinks/
processing com/facebook/applinks/AppLinkData.class...
processing com/facebook/applinks/AppLinkData$1.class...
processing com/facebook/applinks/AppLinkData$CompletionHandler.class...
processing com/facebook/applinks/FacebookAppLinkResolver.class...
processing com/facebook/applinks/FacebookAppLinkResolver$1.class...
processing com/facebook/applinks/FacebookAppLinkResolver$2.class...
ignored resource com/facebook/internal/
processing com/facebook/internal/AnalyticsEvents.class...
processing com/facebook/internal/AppCall.class...
processing com/facebook/internal/AppEventsLoggerUtility.class...
processing com/facebook/internal/AppEventsLoggerUtility$1.class...
processing com/facebook/internal/AppEventsLoggerUtility$GraphAPIActivityType.class...
processing com/facebook/internal/AttributionIdentifiers.class...
processing com/facebook/internal/AttributionIdentifiers$1.class...
processing com/facebook/internal/AttributionIdentifiers$GoogleAdInfo.class...
processing com/facebook/internal/AttributionIdentifiers$GoogleAdServiceConnection.class...
processing com/facebook/internal/BoltsMeasurementEventListener.class...
processing com/facebook/internal/BundleJSONConverter.class...
processing com/facebook/internal/BundleJSONConverter$1.class...
processing com/facebook/internal/BundleJSONConverter$2.class...
processing com/facebook/internal/BundleJSONConverter$3.class...
processing com/facebook/internal/BundleJSONConverter$4.class...
processing com/facebook/internal/BundleJSONConverter$5.class...
processing com/facebook/internal/BundleJSONConverter$6.class...
processing com/facebook/internal/BundleJSONConverter$7.class...
processing com/facebook/internal/BundleJSONConverter$Setter.class...
processing com/facebook/internal/CallbackManagerImpl.class...
processing com/facebook/internal/CallbackManagerImpl$Callback.class...
processing com/facebook/internal/CallbackManagerImpl$RequestCodeOffset.class...
processing com/facebook/internal/CollectionMapper.class...
processing com/facebook/internal/CollectionMapper$1.class...
processing com/facebook/internal/CollectionMapper$2.class...
processing com/facebook/internal/CollectionMapper$Collection.class...
processing com/facebook/internal/CollectionMapper$OnErrorListener.class...
processing com/facebook/internal/CollectionMapper$OnMapValueCompleteListener.class...
processing com/facebook/internal/CollectionMapper$OnMapperCompleteListener.class...
processing com/facebook/internal/CollectionMapper$ValueMapper.class...
processing com/facebook/internal/DialogFeature.class...
processing com/facebook/internal/DialogPresenter.class...
processing com/facebook/internal/DialogPresenter$ParameterProvider.class...
processing com/facebook/internal/FacebookDialogBase.class...
processing com/facebook/internal/FacebookDialogBase$ModeHandler.class...
processing com/facebook/internal/FacebookDialogFragment.class...
processing com/facebook/internal/FacebookDialogFragment$1.class...
processing com/facebook/internal/FacebookDialogFragment$2.class...
processing com/facebook/internal/FacebookRequestErrorClassification.class...
processing com/facebook/internal/FacebookRequestErrorClassification$1.class...
processing com/facebook/internal/FacebookRequestErrorClassification$2.class...
processing com/facebook/internal/FacebookRequestErrorClassification$3.class...
processing com/facebook/internal/FacebookWebFallbackDialog.class...
processing com/facebook/internal/FacebookWebFallbackDialog$1.class...
processing com/facebook/internal/FileLruCache.class...
processing com/facebook/internal/FileLruCache$1.class...
processing com/facebook/internal/FileLruCache$2.class...
processing com/facebook/internal/FileLruCache$3.class...
processing com/facebook/internal/FileLruCache$BufferFile.class...
processing com/facebook/internal/FileLruCache$BufferFile$1.class...
processing com/facebook/internal/FileLruCache$BufferFile$2.class...
processing com/facebook/internal/FileLruCache$CloseCallbackOutputStream.class...
processing com/facebook/internal/FileLruCache$CopyingInputStream.class...
processing com/facebook/internal/FileLruCache$Limits.class...
processing com/facebook/internal/FileLruCache$ModifiedFile.class...
processing com/facebook/internal/FileLruCache$StreamCloseCallback.class...
processing com/facebook/internal/FileLruCache$StreamHeader.class...
processing com/facebook/internal/FragmentWrapper.class...
processing com/facebook/internal/GraphUtil.class...
processing com/facebook/internal/ImageDownloader.class...
processing com/facebook/internal/ImageDownloader$1.class...
processing com/facebook/internal/ImageDownloader$CacheReadWorkItem.class...
processing com/facebook/internal/ImageDownloader$DownloadImageWorkItem.class...
processing com/facebook/internal/ImageDownloader$DownloaderContext.class...
processing com/facebook/internal/ImageDownloader$RequestKey.class...
processing com/facebook/internal/ImageRequest.class...
processing com/facebook/internal/ImageRequest$1.class...
processing com/facebook/internal/ImageRequest$Builder.class...
processing com/facebook/internal/ImageRequest$Callback.class...
processing com/facebook/internal/ImageResponse.class...
processing com/facebook/internal/ImageResponseCache.class...
processing com/facebook/internal/ImageResponseCache$BufferedHttpInputStream.class...
pr<message truncated>
I don't know what's wrong with my project. I've tried finding a multiple .jar file and .aar file (this solution is suggested in many question and it works) which I found none.
Answer by kris_arn · Aug 10, 2016 at 04:20 PM
Just fixed the same issue in my own project, you have 2 copies of support-v4-(version number).arr in your plugins folder.
Check in these two folders:
Assets\FacebookSDK\Plugins\Android\libs\
Assets\Plugins\Android
...
stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
Your answer
Follow this Question
Related Questions
Getting Player Picture with bad request in unity 5 1 Answer
IAP gives ERROR_BROKEN_PIPE 3 Answers
Using Facebook Login unity Pc Build 0 Answers
UNITY FACEBOOK 7.18.0 GET PROFILE PICTURE RETURNING A QUESTION MARK? 1 Answer
web gl facebook multiplayer 0 Answers