Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unable to convert classes to dex format - Android issue

Discussion in 'Android' started by ixikos, Aug 22, 2013.

  1. Vlady73

    Vlady73

    Joined:
    Dec 7, 2016
    Posts:
    2
    PROBLEM WITH BUILDING ANDROID
    this happens because 2 things 1.Facebook SDK include files already contained in Assest/plugins/android, and 2. AndroidManifest.xml has to be updated.

    so I did this:

    1. Open AndroidManifest.xml (Assest/plugins/android/AndroidManifest.xml) with Xcode or Text edit and change line to this:

    uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23"

    READ the error, it will tell you the values needed.

    2. Assest/plugins/android/libs (NOT FacebookSDK/plugins/android/libs ) select All files, and in inspector deselect "android". (some people suggest to delete them, but i just deselect them so when the project builds they won't be included).

    3. in finder look for .jar files duplicates and delete the ones that are in plugins/android Not the ones in Facebook

    this was my case, maybe your is different, what I did was to look for duplicate files in Facebook SDK and Assest/plugins/android!*/
     
  2. ShoutTree

    ShoutTree

    Joined:
    Nov 1, 2013
    Posts:
    5
    In my case, my project used a .jar that's compiled by jdk 1.8, and I get this error when setting jdk to 1.7 in unity.
    I turned to 1.8 and everything's ok.
    AAE37744-69AC-4546-8996-BBCA31A77E01.jpg
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    @ShoutTree you should install JDK 8, and then point your Unity installation to use that (Under Preferences -> External Tools)
     
    Amirraza and MetaDOS like this.
  4. ShoutTree

    ShoutTree

    Joined:
    Nov 1, 2013
    Posts:
    5
    Yes, I did it. Thank you. :)
     
  5. kenculate

    kenculate

    Joined:
    Mar 25, 2013
    Posts:
    15
    I has this error too, I had some plugins and google firebase, I just remove plugin folder content then install firebase then install other plugins, the problem solved !
     
  6. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    I am having the same problem and its with google play and facebook and untiy. I cant believe I am having trouble with these 2 plugins where they dont work together. Over engineered software that doesnt even work.
     
    Last edited: Apr 13, 2017
  7. firaskallel

    firaskallel

    Joined:
    Mar 8, 2014
    Posts:
    1
    I solved it without removing of any files.
    You should do the following: file>Inspector>SelectPlatformForPlugin>Standalone. Apply. Do it for both files under plugins: support-v4-23.4.0 and support-annotations-23.4.0
     
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Really wrong advice by @firaskallel . these files are Android related, and should not be included in Standalone builds.
     
  9. fazhom

    fazhom

    Joined:
    Jan 18, 2013
    Posts:
    10
    Hello

    I had the same problem and, as some said, it's was a problem of duplicated files.

    For me it was the files:

    support-annotations-24.0.0.jar
    support-v4-24.0.0.aar


    They were present in my "Assets\Plugins\Android" folder and in my "Assets\FacebookSDK\Plugins\Android\libs".
    (The one in the Facebook folder was a different version)

    I deleted the one in the Facebook folder (when I tried to delete the one in Android, it came back automaticaly).
     
    Meltdown and Loomabox like this.
  10. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    46
    You've made my day!
    Thank you very much for sharing!

    Before reading your post i removed some bolts... jar files and don't know if I should put them back, since I don't remember where they were. Project compiles with no errors, so I guess those jar files are not necessary.
     
    Last edited: May 15, 2017
  11. ian_rakhiruchi

    ian_rakhiruchi

    Joined:
    Jan 12, 2016
    Posts:
    1
    search support

    My problem are solved/ Screenshot (7).png
     
  12. BowlerBitesLane

    BowlerBitesLane

    Joined:
    Mar 23, 2014
    Posts:
    4


    This fixed it for me as well thanks! They didn't show up in the Unity editor for me so I navigated to the patch in file explorer, and low and behold! Deleted the files. Problem solved.

    *EDIT* Actually I found that I still had an issue with GPG services crashing my app when I actually went to use them in the built application. I had to replace the existing aar's in the "Assets\Plugins\Android" folder with the attached versions. I then went to Assets/PlayServicesResolver/AndroidResolver/Settings in the unity editor menu to disable "Install Android Packages." Hope this helps someone with the same issue.
     

    Attached Files:

    Last edited: Jun 2, 2017
  13. KutlayMD

    KutlayMD

    Joined:
    Jul 2, 2017
    Posts:
    5
    I solved it by removing UnityAds.aar. Open your project files go assests-plugins-Android there will be UnityAds.aar just delete this.
     
  14. DVFrance

    DVFrance

    Joined:
    Jul 9, 2012
    Posts:
    19
    I had the same issue and it was a duplicated lib, I used many plugin in my project and some of them already included "android-support-v4.jar", just deleting duplicates solve my pb.
     
    tolosaoldfan and Kurius like this.
  15. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412
    I agree with @awesome-alex you should search your entire project for files containing the word "support", then delete any files with duplicate file names (leaving just a single copy of the file with that name). This is most often the solution to DEX errors.
     
    liortal and tolosaoldfan like this.
  16. NextTime

    NextTime

    Joined:
    Jan 10, 2017
    Posts:
    2
    I solve this problem deleted dublicated file .jar
    this problem apear then I updated applovin
     
    tolosaoldfan likes this.
  17. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    140
    Solved this problem deleting project/plugins
     
    Last edited: Oct 22, 2017
  18. MuhammadSaddamAslam

    MuhammadSaddamAslam

    Joined:
    May 24, 2017
    Posts:
    1
    Solved this problem.
    This issue is only due to SDK, use some previous version of SDK to resolve your problem
     
  19. BiserMarkov

    BiserMarkov

    Joined:
    Nov 12, 2017
    Posts:
    1
    Just had the same problem ... Just deleted the old files that are duplicated with older version ... see the screenshot
     

    Attached Files:

  20. Ali_Abbas

    Ali_Abbas

    Joined:
    Nov 13, 2017
    Posts:
    1
    Great :) ... thanks dear ;)
     
    MikeGorokhov likes this.
  21. rnnbl4133

    rnnbl4133

    Joined:
    Jan 3, 2018
    Posts:
    3
    For me I had incompatible sdk/jdk/ndk I had to install ndk r13b, jdk 8 and sdk 21 That helped solve this problem.
     
  22. oladoto

    oladoto

    Joined:
    Jan 21, 2017
    Posts:
    1
    Just in case anyone still has this issue, I encountered this problem and was able to solve this way:
    1. I deleted the downloaded Unity Ads Asset
    2. Navigated to Assets/Plugin/Android
    3. Deleted anything that started with UnityAds.*
    4. Disabled Ads under the Services panel.
    5. Commented out all codes referring to Advertisements in my game.
    6. Restarted Unity.
    7. Tested the game, now without adverts. I expected this to work as normal.
    8. Re-hinged the Ads on the services panel.
    9. Un-commented the Advertisement code.
    10. Commented out the Advertisement,initialize line.
    At this point. all worked well.
     
  23. Koshechkin

    Koshechkin

    Joined:
    Nov 18, 2015
    Posts:
    4
    I have this problem even with empty project: I created new project - apk build success. Imported only the facebook-unity-sdk-7.11.0 there - have apk build failed:
    CommandInvokationFailure: Failed to re-package resources.
    C:\_androidWork\build-tools\27.0.3\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/_androidWork\platforms\android-25\android.jar" -F bin/resources.ap_ --extra-packages ...

    Any help please...
     

    Attached Files:

    • log.txt
      File size:
      16.1 KB
      Views:
      940
  24. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,991
    just got this one also,
    looks like it probably started happening after importing EasyMovieTexture and UMP-plugins to same project.
    (was just testing, so not sure how to fix for those)
     
  25. joei22pk

    joei22pk

    Joined:
    Nov 24, 2017
    Posts:
    1
    CommandInvokationFailure: Unable to convert classes into dex format.
    C:/jdk1.8.0_161\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Android/ADT Bundle 64bit/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Unity20172.0f3\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$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;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorProvider;

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
    at com.android.dx.command.dexer.Main.runDx(Main.java:291)
    at com.android.dx.command.dexer.Main.main(Main.java:247)
    at com.android.dx.command.Main.main(Main.java:94)
    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:130)
    Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
    ... 9 more
    ]
    stdout[
    processing archive C:\Users\admin\Desktop\logical_thinkingschool_gameProject\gameProject\Temp\StagingArea\android-libraries\com.android.support.support-compat-25.2.0\libs\.\classes.jar...
    processing android/support/compat/BuildConfig.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanImpl.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanMr2Impl.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBean.class...
    processing android/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2.class...
    processing android/support/v4/animation/AnimatorCompatHelper.class...
    processing android/support/v4/animation/AnimatorListenerCompat.class...
    processing android/support/v4/animation/AnimatorProvider.class...
    processing android/support/v4/animation/AnimatorUpdateListenerCompat.class...
    processing android/support/v4/animation/GingerbreadAnimatorCompatProvider.class...
    processing android/support/v4/animation/GingerbreadAnimatorCompatProvider$GingerbreadFloatValueAnimator.class...
    processing android/support/v4/animation/GingerbreadAnimatorCompatProvider$GingerbreadFloatValueAnimator$1.class...
    processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider.class...
    processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$AnimatorListenerCompatWrapper.class...
    processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$HoneycombValueAnimatorCompat.class...
    processing android/support/v4/animation/HoneycombMr1AnimatorCompatProvider$HoneycombValueAnimatorCompat$1.class...
    processing android/support/v4/animation/ValueAnimatorCompat.class...
    processing android/support/v4/app/ActivityCompat.class...
    processing android/support/v4/app/ActivityCompat$1.class...
    processing android/support/v4/app/ActivityCompat$OnRequestPermissionsResultCallback.class...
    processing android/support/v4/app/ActivityCompat$SharedElementCallback21Impl.class...
    processing android/support/v4/app/ActivityCompat$SharedElementCallback23Impl.class...
    processing android/support/v4/app/ActivityCompat$SharedElementCallback23Impl$1.class...
    processing android/support/v4/app/ActivityCompatApi21.class...
    processing android/support/v4/app/ActivityCompatApi21$SharedElementCallback21.class...
    processing android/support/v4/app/ActivityCompatApi21$SharedElementCallbackImpl.class...
    processing android/support/v4/app/ActivityCompatApi22.class...
    processing android/support/v4/app/ActivityCompatApi23.class...
    processing android/support/v4/app/ActivityCompatApi23$OnSharedElementsReadyListenerBridge.class...
    processing android/support/v4/app/ActivityCompatApi23$RequestPermissionsRequestCodeValidator.class...
    processing android/support/v4/app/ActivityCompatApi23$SharedElementCallback23.class...
    processing android/support/v4/app/ActivityCompatApi23$SharedElementCallbackImpl.class...
    processing android/support/v4/app/ActivityCompatApi23$SharedElementCallbackImpl$1.class...
    processing android/support/v4/app/ActivityCompatHoneycomb.class...
    processing android/support/v4/app/ActivityCompatJB.class...
    processing android/support/v4/app/ActivityManagerCompat.class...
    processing android/support/v4/app/ActivityManagerCompatKitKat.class...
    processing android/support/v4/app/ActivityOptionsCompat.class...
    processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl21.class...
    processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl23.class...
    processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl24.class...
    processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImplJB.class...
    processing android/support/v4/app/ActivityOptionsCompat21.class...
    processing android/support/v4/app/ActivityOptionsCompat23.class...
    processing android/support/v4/app/ActivityOptionsCompat24.class...
    processing android/support/v4/app/ActivityOptionsCompatJB.class...
    processing android/support/v4/app/AppOpsManagerCompat.class...
    processing android/support/v4/app/AppOpsManagerCompat$AppOpsManager23.class...
    processing android/support/v4/app/AppOpsManagerCompat$AppOpsManagerImpl.class...
    processing android/support/v4/app/AppOpsManagerCompat23.class...
    processing android/support/v4/app/BundleCompat.class...
    processing android/support/v4/app/BundleCompatGingerbread.class...
    processing android/support/v4/app/BundleCompatJellybeanMR2.class...
    processing android/support/v4/app/BundleUtil.class...
    processing android/support/v4/app/INotificationSideChannel.class...
    processing android/support/v4/app/INotificationSideChannel$Stub.class...
    processing android/support/v4/app/INotificationSideChannel$Stub$Proxy.class...
    processing android/support/v4/app/NotificationBuilderWithActions.class...
    processing android/support/v4/app/NotificationBuilderWithBuilderAccessor.class...
    processing android/support/v4/app/NotificationCompat.class...
    processing android/support/v4/app/NotificationCompat$Action.class...
    processing android/support/v4/app/NotificationCompat$Action$1.class...
    processing android/support/v4/app/NotificationCompat$Action$Builder.class...
    processing android/support/v4/app/NotificationCompat$Action$Extender.class...
    processing android/support/v4/app/NotificationCompat$Action$WearableExtender.class...
    processing android/support/v4/app/NotificationCompat$BigPictureStyle.class...
    processing android/support/v4/app/NotificationCompat$BigTextStyle.class...
    processing android/support/v4/app/NotificationCompat$Builder.class...
    processing android/support/v4/app/NotificationCompat$BuilderExtender.class...
    processing android/support/v4/app/NotificationCompat$CarExtender.class...
    processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation.class...
    processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation$1.class...
    processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation$Builder.class...
    processing android/support/v4/app/NotificationCompat$Extender.class...
    processing android/support/v4/app/NotificationCompat$InboxStyle.class...
    processing android/support/v4/app/NotificationCompat$MessagingStyle.class...
    processing android/support/v4/app/NotificationCompat$MessagingStyle$Message.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImpl.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi20.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi21.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplApi24.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplBase.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplHoneycomb.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplIceCreamSandwich.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplJellybean.class...
    processing android/support/v4/app/NotificationCompat$NotificationCompatImplKitKat.class...
    processing android/support/v4/app/NotificationCompat$Style.class...
    processing android/support/v4/app/NotificationCompat$WearableExtender.class...
    processing android/support/v4/app/NotificationCompatApi20.class...
    processing android/support/v4/app/NotificationCompatApi20$Builder.class...
    processing android/support/v4/app/NotificationCompatApi21.class...
    processing android/support/v4/app/NotificationCompatApi21$Builder.class...
    processing android/support/v4/app/NotificationCompatApi23.class...
    processing android/support/v4/app/NotificationCompatApi24.class...
    processing android/support/v4/app/NotificationCompatApi24$Builder.class...
    processing android/support/v4/app/NotificationCompatBase.class...
    processing android/support/v4/app/NotificationCompatBase$Action.class...
    processing android/support/v4/app/NotificationCompatBase$Action$Factory.class...
    processing android/support/v4/app/NotificationCompatBase$UnreadConversation.class...
    processing android/support/v4/app/NotificationCompatBase$UnreadConversation$Factory.class...
    processing android/support/v4/app/NotificationCompatExtras.class...
    processing android/support/v4/app/NotificationCompatHoneycomb.class...
    processing android/support/v4/app/NotificationCompatIceCreamSandwich.class...
    processing android/support/v4/app/NotificationCompatIceCreamSandwich$Builder.class...
    processing android/support/v4/app/NotificationCompatJellybean.class...
    processing android/support/v4/app/NotificationCompatJellybean$Builder.class...
    processing android/support/v4/app/NotificationCompatKitKat.class...
    processing android/support/v4/app/NotificationCompatKitKat$Builder.class...
    processing android/support/v4/app/NotificationCompatSideChannelService.class...
    processing android/support/v4/app/NotificationCompatSideChannelService$NotificationSideChannelStub.class...
    processing android/support/v4/app/NotificationManagerCompat.class...
    processing android/support/v4/app/NotificationManagerCompat$CancelTask.class...
    processing android/support/v4/app/NotificationManagerCompat$Impl.class...
    processing android/support/v4/app/NotificationManagerCompat$ImplApi24.class...
    processing android/support/v4/app/NotificationManagerCompat$ImplBase.class...
    processing android/support/v4/app/NotificationManagerCompat$ImplIceCreamSandwich.class...
    processing android/support/v4/app/NotificationManagerCompat$ImplKitKat.class...
    processing android/support/v4/app/NotificationManagerCompat$NotifyTask.class...
    processing android/support/v4/app/NotificationManagerCompat$ServiceConnectedEvent.class...
    processing android/support/v4/app/NotificationManagerCompat$SideChannelManager.class...
    processing android/support/v4/app/NotificationManagerCompat$SideChannelManager$ListenerRecord.class...
    processing android/support/v4/app/NotificationManagerCompat$Task.class...
    processing android/support/v4/app/NotificationManagerCompatApi24.class...
    processing android/support/v4/app/NotificationManagerCompatIceCreamSandwich.class...
    processing android/support/v4/app/NotificationManagerCompatKitKat.class...
    processing android/support/v4/app/RemoteInput.class...
    processing android/support/v4/app/RemoteInput$1.class...
    processing android/support/v4/app/RemoteInput$Builder.class...
    processing android/support/v4/app/RemoteInput$Impl.class...
    processing android/support/v4/app/RemoteInput$ImplApi20.class...
    processing android/support/v4/app/RemoteInput$ImplBase.class...
    processing android/support/v4/app/RemoteInput$ImplJellybean.class...
    processing android/support/v4/app/RemoteInputCompatApi20.class...
    processing android/support/v4/app/RemoteInputCompatBase.class...
    processing android/support/v4/app/RemoteInputCompatBase$RemoteInput.class...
    processing android/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory.class...
    processing android/support/v4/app/RemoteInputCompatJellybean.class...
    processing android/support/v4/app/ServiceCompat.class...
    processing android/support/v4/app/ServiceCompat$Api24ServiceCompatImpl.class...
    processing android/support/v4/app/ServiceCompat$BaseServiceCompatImpl.class...
    processing android/support/v4/app/ServiceCompat$ServiceCompatImpl.class...
    processing android/support/v4/app/ServiceCompat$StopForegroundFlags.class...
    processing android/support/v4/app/ServiceCompatApi24.class...
    processing android/support/v4/app/ShareCompat.class...
    processing android/support/v4/app/ShareCompat$IntentBuilder.class...
    processing android/support/v4/app/ShareCompat$IntentReader.class...
    processing android/support/v4/app/ShareCompat$ShareCompatImpl.class...
    processing android/support/v4/app/ShareCompat$ShareCompatImplBase.class...
    processing android/support/v4/app/ShareCompat$ShareCompatImplICS.class...
    processing android/support/v4/app/ShareCompat$ShareCompatImplJB.class...
    processing android/support/v4/app/ShareCompatICS.class...
    processing android/support/v4/app/ShareCompatJB.class...
    processing android/support/v4/app/SharedElementCallback.class...
    processing android/support/v4/app/SharedElementCallback$OnSharedElementsReadyListener.class...
    processing android/support/v4/app/SupportActivity.class...
    processing android/support/v4/app/SupportActivity$ExtraData.class...
    processing android/support/v4/content/ContentResolverCompat.class...
    processing android/support/v4/content/ContentResolverCompat$ContentResolverCompatImpl.class...
    processing android/support/v4/content/ContentResolverCompat$ContentResolverCompatImplBase.class...
    processing android/support/v4/content/ContentResolverCompat$ContentResolverCompatImplJB.class...
    processing android/support/v4/content/ContentResolverCompatJellybean.class...
    processing android/support/v4/content/ContextCompat.class...
    processing android/support/v4/content/ContextCompatApi21.class...
    processing android/support/v4/content/ContextCompatApi23.class...
    processing android/support/v4/content/ContextCompatApi24.class...
    processing android/support/v4/content/ContextCompatHoneycomb.class...
    processing andro<message truncated>
     
  26. majidyounis190

    majidyounis190

    Joined:
    May 22, 2018
    Posts:
    1
    If you have used Admob then look for "support-v4" file under your Plugins> android folder. Probably it would have been duplicated and you need to delete one of them. It doesn't necessarily have to be in the same folder.
     
  27. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,554
    I want to add one more cause of this.

    If you are making your own Android plugin with Android Studio and you reference `unityclasses.jar`, if that slips into your .aar file it will conflict with the one Unity is going to add `classes.jar`. The error will be like this.

    Screenshot 2018-08-31 19.38.22.png

    To fix, in your build.gradle file instead of adding dependencies as `implementation fileTree` you use `compileOnly` instead. It can then use your project `unityclasses.jar` just for compiling but not adding it to your .aar, then your .aar will use the real one Unity is going to add at runtime.

    Code (CSharp):
    1. dependencies {
    2.     // Avoid redundant Unity Player in final application APK
    3.     compileOnly files('./libs/unityclasses.jar')
    4. }
    To debug what's in your .aar you can change the extension to .zip and you can see everything inside.
     
  28. cherucole

    cherucole

    Joined:
    Dec 15, 2016
    Posts:
    2
    I had the same error and turns out it was because I had to jar files similar. One was in the path of facebook sdk android plugin and the other was the default one that exists in Plugins/Android. I deleted the one isnide facebook path and it worked. Dont rename just delete it entirely
     
  29. Amirraza

    Amirraza

    Joined:
    Jul 13, 2018
    Posts:
    17
    would you kindly tell me something more ! i have same plugins which youhave ...
     
  30. Amirraza

    Amirraza

    Joined:
    Jul 13, 2018
    Posts:
    17
    will you knidly tell me something about this error
     

    Attached Files:

  31. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412