playMaker

Author Topic: can't build to android [help](unable to convert classes to dex format)  (Read 4128 times)

Ofonna

  • Full Member
  • ***
  • Posts: 230
heyy guys, i've been facing this issue for 2 days now and i've tried everything.
i dont why i keep getting this error when i try to build to android, please let me know if you've faced such a problem, thanks...

CommandInvokationFailure: Unable to convert classes into dex format.

C:/Program Files (x86)/Java/jdk1.8.0_121\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/nweze/AppData/Local/Android/sdk1\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: Lcom/android/vending/billing/IInAppBillingService;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/vending/billing/IInAppBillingService$Stub;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/vending/billing/IInAppBillingService$Stub$Proxy;
3 errors; aborting
]
stdout[
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\GoogleAIDL\libs\.\classes.jar...
processing com/android/vending/billing/BuildConfig.class...
processing com/android/vending/billing/IInAppBillingService.class...
processing com/android/vending/billing/IInAppBillingService$Stub.class...
processing com/android/vending/billing/IInAppBillingService$Stub$Proxy.class...
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\GooglePlay\libs\.\classes.jar...
processing com/unity/purchasing/googleplay/ActivityLauncher.class...
processing com/unity/purchasing/googleplay/BillingServiceManager.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1$1.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$1$2.class...
processing com/unity/purchasing/googleplay/BillingServiceManager$2.class...
processing com/unity/purchasing/googleplay/BillingServiceProcessor.class...
processing com/unity/purchasing/googleplay/BuildConfig.class...
processing com/unity/purchasing/googleplay/Consts.class...
processing com/unity/purchasing/googleplay/Consts$PurchaseState.class...
processing com/unity/purchasing/googleplay/Consts$ResponseCode.class...
processing com/unity/purchasing/googleplay/GooglePlayBillingUnAvailableException.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$1.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$2.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$3.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$4.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$5.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$6.class...
processing com/unity/purchasing/googleplay/GooglePlayPurchasing$7.class...
processing com/unity/purchasing/googleplay/IActivityLauncher.class...
processing com/unity/purchasing/googleplay/IBillingServiceManager.class...
processing com/unity/purchasing/googleplay/IabException.class...
processing com/unity/purchasing/googleplay/IabHelper.class...
processing com/unity/purchasing/googleplay/IabHelper$1.class...
processing com/unity/purchasing/googleplay/IabHelper$2.class...
processing com/unity/purchasing/googleplay/IabHelper$2$1.class...
processing com/unity/purchasing/googleplay/IabHelper$3.class...
processing com/unity/purchasing/googleplay/IabHelper$4.class...
processing com/unity/purchasing/googleplay/IabHelper$OnConsumeFinishedListener.class...
processing com/unity/purchasing/googleplay/IabHelper$OnConsumeMultiFinishedListener.class...
processing com/unity/purchasing/googleplay/IabHelper$OnIabPurchaseFinishedListener.class...
processing com/unity/purchasing/googleplay/IabHelper$OnIabSetupFinishedListener.class...
processing com/unity/purchasing/googleplay/IabHelper$QueryInventoryFinishedListener.class...
processing com/unity/purchasing/googleplay/IabResult.class...
processing com/unity/purchasing/googleplay/Inventory.class...
processing com/unity/purchasing/googleplay/Purchase.class...
processing com/unity/purchasing/googleplay/PurchaseActivity.class...
processing com/unity/purchasing/googleplay/PurchaseFailedEvent.class...
processing com/unity/purchasing/googleplay/SkuDetails.class...
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\an_billing\libs\.\classes.jar...
processing com/android/vending/billing/IInAppBillingService.class...
processing com/android/vending/billing/IInAppBillingService$Stub.class...
processing com/android/vending/billing/IInAppBillingService$Stub$Proxy.class...
processing com/androidnative/billing/core/AN_BillingProxyActivity.class...
processing com/androidnative/billing/core/AN_BillingProxyActivity$1.class...
processing com/androidnative/billing/core/BillingHelper.class...
processing com/androidnative/billing/core/BillingHelper$1.class...
processing com/androidnative/billing/core/BillingHelper$2.class...
processing com/androidnative/billing/core/BillingHelper$2$1.class...
processing com/androidnative/billing/core/BillingHelper$3.class...
processing com/androidnative/billing/core/BillingHelper$3$1.class...
processing com/androidnative/billing/core/BillingHelper$3$2.class...
processing com/androidnative/billing/core/BillingManager.class...
processing com/androidnative/billing/core/BillingManager$1.class...
processing com/androidnative/billing/core/BillingManager$2.class...
processing com/androidnative/billing/core/BillingManager$3.class...
processing com/androidnative/billing/core/listeners/AN_PurchaseFinishedListener.class...
processing com/androidnative/billing/core/listeners/AN_QueryInventoryFinishedListener.class...
processing com/androidnative/billing/interfaces/OnBillingPurchaseFinishedListener.class...
processing com/androidnative/billing/interfaces/OnBillingSetupFinishedListener.class...
processing com/androidnative/billing/interfaces/OnConsumeFinishedListener.class...
processing com/androidnative/billing/interfaces/OnConsumeMultiFinishedListener.class...
processing com/androidnative/billing/interfaces/QueryInventoryFinishedListener.class...
processing com/androidnative/billing/models/BillingException.class...
processing com/androidnative/billing/models/BillingResult.class...
processing com/androidnative/billing/models/Inventory.class...
processing com/androidnative/billing/models/Purchase.class...
processing com/androidnative/billing/models/Security.class...
processing com/androidnative/billing/models/SkuDetails.class...
processing com/androidnative/billing/util/Base64.class...
processing com/androidnative/billing/util/Base64DecoderException.class...
processing com/example/an_billing/BuildConfig.class...
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\an_googleplay\libs\.\classes.jar...
processing com/androidnative/gcm/ANCloudMessageService.class...
processing com/androidnative/gcm/ANCloudMessageService$1.class...
processing com/androidnative/gcm/AN_PictureLoadingListener.class...
processing com/androidnative/gcm/GcmBroadcastReceiver.class...
processing com/androidnative/gcm/GcmIntentService.class...
processing com/androidnative/gcm/PictureLoadingTask.class...
processing com/androidnative/gcm/PictureLoadingTaskListener.class...
processing com/androidnative/gms/ad/ANMobileAd.class...
processing com/androidnative/gms/ad/AdInAppListner.class...
processing com/androidnative/gms/ad/BannerAdListner.class...
processing com/androidnative/gms/ad/GADBanner.class...
processing com/androidnative/gms/ad/InterstitialAdListner.class...
processing com/androidnative/gms/ad/RewardedAdListener.class...
processing com/androidnative/gms/analytics/AN_AnalyticsProxy.class...
processing com/androidnative/gms/analytics/V4GoogleAnalytics.class...
processing com/androidnative/gms/core/AppInvitesController.class...
processing com/androidnative/gms/core/GameClientBridge.class...
processing com/androidnative/gms/core/GameClientManager.class...
processing com/androidnative/gms/core/GameClientManager$1.class...
processing com/androidnative/gms/core/GameClientManager$2.class...
processing com/androidnative/gms/core/GameClientManager$3.class...
processing com/androidnative/gms/core/GameClientManager$4.class...
processing com/androidnative/gms/core/GameClientManager$5.class...
processing com/androidnative/gms/core/GameClientManager$6.class...
processing com/androidnative/gms/core/GameInvitationManager.class...
processing com/androidnative/gms/core/GooglePlaySupportActivity.class...
processing com/androidnative/gms/core/NewGameHelper.class...
processing com/androidnative/gms/listeners/appInvite/AppInviteListner.class...
processing com/androidnative/gms/listeners/games/AchievementsLoadListner.class...
processing com/androidnative/gms/listeners/games/AchievementsUpdateListner.class...
processing com/androidnative/gms/listeners/games/LeaderBoardScoreLoaded.class...
processing com/androidnative/gms/listeners/games/LeaderBoardsLoadedListener.class...
processing com/androidnative/gms/listeners/games/PlayerResultListner.class...
processing com/androidnative/gms/listeners/games/PlayerScoreUpdateListner.class...
processing com/androidnative/gms/listeners/games/ScoreSubmitedListner.class...
processing com/androidnative/gms/listeners/network/AN_OnInvitationReceivedListener.class...
processing com/androidnative/gms/listeners/network/AN_RealTimeMessageReceivedListener.class...
processing com/androidnative/gms/listeners/network/AN_ReliableMessageSentCallback.class...
processing com/androidnative/gms/listeners/network/AN_RoomStatusUpdateListener.class...
processing com/androidnative/gms/listeners/network/AN_RoomUpdateListener.class...
processing com/androidnative/gms/listeners/quests/AN_AcceptQuestResultListner.class...
processing com/androidnative/gms/listeners/quests/AN_ClaimMilestoneResult.class...
processing com/androidnative/gms/listeners/quests/AN_EventsLoadListner.class...
processing com/androidnative/gms/listeners/quests/AN_LoadQuestsResult.class...
processing com/androidnative/gms/listeners/quests/AN_QuestUpdateListener.class...
processing com/androidnative/gms/listeners/requests/AN_LoadRequestsResultListner.class...
processing com/androidnative/gms/listeners/requests/AN_UpdateRequestsResultListner.class...
processing com/androidnative/gms/listeners/savedgames/DeleteSnapShotListner.class...
processing com/androidnative/gms/listeners/savedgames/DeleteSpapShotResultListner.class...
processing com/androidnative/gms/listeners/savedgames/LoadSnapshotsResultListner.class...
processing com/androidnative/gms/listeners/savedgames/OpenSnapshotListner.class...
processing com/androidnative/gms/listeners/savedgames/SnapshotCreateListner.class...
processing com/androidnative/gms/listeners/savedgames/SnapshotMetadataChangeListner.class...
processing com/androidnative/gms/listeners/tbm/AN_OnCancelMatchResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnInvitationAcceptedCallback.class...
processing com/androidnative/gms/listeners/tbm/AN_OnLeaveMatchResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnLoadInvitationsResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnLoadMatchResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnLoadMatchesResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnMatchInitiatedCallback.class...
processing com/androidnative/gms/listeners/tbm/AN_OnTurnBasedMatchUpdateReceivedListener.class...
processing com/androidnative/gms/listeners/tbm/AN_OnTurnResult.class...
processing com/androidnative/gms/listeners/tbm/AN_OnUpdateMatchResult.class...
processing com/androidnative/gms/network/RealTimeMultiplayerController.class...
processing com/androidnative/gms/network/TurnBasedMultiplayerController.class...
processing com/androidnative/gms/plus/controllers/AN_PlusButtonController.class...
processing com/androidnative/gms/plus/models/AN_PlusButton.class...
processing com/androidnative/gms/plus/models/AN_PlusButton$1.class...
processing com/androidnative/gms/utils/AN_IdFactory.class...
processing com/androidnative/gms/utils/AnUtility.class...
processing com/androidnative/gms/utils/Base64.class...
processing com/androidnative/gms/utils/Base64DecoderException.class...
processing com/androidnative/gms/utils/PS_Utility.class...
processing com/androidnative/gms/utils/PS_Utility$1.class...
processing com/example/an_googleplay/BuildConfig.class...
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\an_social\libs\.\classes.jar...
processing com/androidnative/features/social/common/ChooserArrayAdapter.class...
processing com/androidnative/features/social/common/ChooserArrayAdapter$1.class...
processing com/androidnative/features/social/common/ChooserArrayAdapter$2.class...
processing com/androidnative/features/social/common/ChooserArrayAdapter$OnChooseArrayItemClickListener.class...
processing com/androidnative/features/social/common/SocialGate.class...
processing com/androidnative/features/social/common/SocialGate$1.class...
processing com/androidnative/features/social/common/SocialProxyActivity.class...
processing com/androidnative/features/social/common/SocialProxyActivity$1.class...
processing com/androidnative/features/social/common/SocialProxyActivity$2.class...
processing com/androidnative/features/social/fb/FBAppRequestCompleteListner.class...
processing com/androidnative/features/social/fb/FBExtended.class...
processing com/androidnative/features/social/gplus/GPlusShare.class...
processing com/androidnative/features/social/gplus/ParseDeepLinkActivity.class...
processing com/androidnative/features/social/instagram/AnInstagram.class...
processing com/androidnative/features/social/twitter/ANTwitter.class...
processing com/androidnative/features/social/twitter/ANTwitter$1.class...
processing com/androidnative/features/social/twitter/ANTwitter$2.class...
processing com/androidnative/features/social/twitter/ANTwitter$3.class...
processing com/androidnative/features/social/twitter/ANTwitter$updateTwitterStatus.class...
processing com/androidnative/features/social/utils/Base64.class...
processing com/androidnative/features/social/utils/Base64DecoderException.class...
processing com/androidnative/features/social/utils/SocialConf.class...
processing com/example/an_social/BuildConfig.class...
processing archive C:\Users\nweze\Desktop\Unity5 Projects\Strange G\practice zone\Temp\StagingArea\android-libraries\androidnative\libs\.\classes.jar...
processing com/androidnative/AN_Bridge.class...
processing com/androidnative/AndroidNativeBridge.class...
processing com/androidnative/AndroidNativeProxy.class...
processing com/androidnative/OAuthProxyActivity.class...
processing com/androidnative/OAuthProxyActivity$OAuthProxyWebViewClient.class...
processing com/androidnative/features/AN_TV.class...
processing com/androidnative/features/AppInfoLoader.class...
processing com/androidnative/features/CameraAPI.class...
processing com/androidnative/features/ImmersiveMode.class...
processing com/androidnative/features/ImmersiveMode$1.class...
processing com/androidnative/features/ImmersiveMode$2.class...
processing com/androidnative/features/ImmersiveMode$3.class...
processing com/androidnative/features/common/AddressBookManager.class...
processing com/androidnative/features/common/AndroidNativeUtility.class...
processing com/androidnative/features/notifications/LocalNotificationManager.class...
processing com/androidnative/features/notifications/LocalNotificationReceiver.class...
processing com/androidnative/features/notifications/LocalNotificationService.class...
processing com/androidnative/features/notifications/LocalNotificationsController.class...
processing com/androidnative/features/permissions/PermissionsManager.class...
processing com/androidnative/firebase/analytics/Bridge.class...
processing com/androidnative/firebase/analytics/Manager.class...
processing com/androidnative/licensing/AppLicenseCheckerCallback.class...
processing com/androidnative/licensing/LicenseManager.class...
processing com/androidnative/popups/PopUpsManager.class...
processing com/androidnative/popups/PopUpsManager$1.class...
processing com/androidnativ<message truncated>

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #1 on: February 24, 2017, 06:10:14 PM »
Hi,
Did you update android native recently?
I had this recently and had to remove all the files from android native and reinstall it.

When you update AN it is recommended that you first click remove in the AN edit page.

Code: [Select]
already added: Lcom/android/vending/billing/IInAppBillingService;This means that it has added this already and gives errors because it can't put it twice

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #2 on: February 24, 2017, 06:25:55 PM »
hi thank you for the quick reply,

i deleted the AN files and i was able to build without problems.

i'm about to re install it and i'll give you a bump soon

thanks!

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #3 on: February 24, 2017, 07:09:53 PM »
hi djaydino, i've reinstalled it after clicking remove, but it still persists, i believe the issue is because I have unity IAP installed, and so there are files wiith the same class trying to compile on build, i'm not too sure if that's the case. but i would like to know if you also import the the unity store package or not, if not then that should be my problem.

thank you so much!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #4 on: February 25, 2017, 03:19:52 PM »
hi.
If you are on unity 5.2+ (i believe it is, it could be from a different version and up)

you should not install the unity iap from the asset store
it is already there in the standard unity...

You can check it by pressing edit/modules

There should be unityPurchasing if so, remove the installed one from the asset store.

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #5 on: February 25, 2017, 05:45:35 PM »
thanks djaydino, i didnt install unity iap from the asset store, all i did was import these files from the IAP window

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: can't build to android [help](unable to convert classes to dex format)
« Reply #6 on: February 26, 2017, 03:04:41 PM »
it has to do with android native, i think its best to ask support on stan's website.