Google.JarResolver.ResolutionException issue

 

(Don't forget to be on target build = Android)

Have more questions? Submit a request

28 Comments

  • 0
    Avatar
    Danny Eeeva

    hi, i didn't find google play services menu on my unity. I switched build settings to Android, but nothing.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    Do you import the  Google Play SDK?

  • 0
    Avatar
    Danny Eeeva

    Assets/Very_Simple_Leaderboard/Scripts/LeaderboardManager.cs(15,7): error CS0246: The type or namespace name `GooglePlayGames' could not be found. Are you missing a using directive or an assembly reference?

     

    yes, I have added the path of sdk,jdk and ndk from preferences>external tools

    Edited by Danny Eeeva
  • 0
    Avatar
    Gilbert Anthony BAROUCH

    No no the Google sdk you have to import in the project
    Have a look to the documentation of open the VS leaderbord editor windows

  • 0
    Avatar
    Danny Eeeva

    so I have to download the google sdk file from github and import into unity right?

     

    Nevermind bro.. Got it fixed now. I am new to unity, so, do not be pissed by my questions. I really appreciate your help so far. Thanks

    Edited by Danny Eeeva
  • 0
    Avatar
    Gilbert Anthony BAROUCH

    Yes or if you prefer I can send to you the asset with the package already include... 

     

    let me know. 

     

     

  • 0
    Avatar
    Danny Eeeva

    Now, I am getting this error while building.. It might not be related to your code, but how do I fix it?

    CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
    /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/user2016/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

     

     

    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zznm;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zznn;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzno;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzno$zza;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zznp;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zznq;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqi;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqi$zza;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzqj;
    9 errors; aborting

    Edited by Danny Eeeva
  • 0
    Avatar
    Gilbert Anthony BAROUCH

    Do what the GIF explains.

    It's lot related to my asset.

  • 0
    Avatar
    Danny Eeeva

    see the screenshot.. Even after doing the Google play service jar fix, the error still persists. See the error log I sent first. I think is is complaining about file conflicts... THat is, some file are morethan one.. but, I can't find the folder where these files are.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    It's in the plugin folder (and thanks to you to share with other user your issue) 

  • 0
    Avatar
    Danny Eeeva

    in the plugins folder, we got;

    play-services-ads-9.0.0.aar
    play-services-ads-lite-9.0.0.aar
    play-services-base-9.0.0.aar
    play-services-basement-9.0.0.aar

    do you think it is suppose to be so? like conflicts in code? whats the structure of yours like and how did you manage to build for android? can you help me here?

  • 0
    Avatar
    Gilbert Anthony BAROUCH

  • 0
    Avatar
    Danny Eeeva

    I was able to bypass the "unable to convert classes into dex" error... However, I got hit by this one again;

    CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    /Users/.../Library/Android/sdk/build-tools/24.0.0-preview/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Users/../Library/Android/sdk/platforms/android-23/android.jar" -F bin/resources.ap_ --extra-packages com.chartboost.sdk.unity:com.google.unity:com.google.example.games.mainlibproj:android.support.v7.appcompat:com.google.firebase:com.google.android.gms.ads.impl:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.nearby:com.google.android.gms.tasks:android.support.v4 -S

     

    what version of unity do you use? I use 5.3.4f1... can that be an issue?

    And do I have to edit every AndroidManifest file in the project to change the package name to mine or do I just edit the bundle identifier in the player settings and it will Auto-update every file needed?

    Edited by Danny Eeeva
  • 0
    Avatar
    Danny Eeeva

    hey man, answer me.. I am kinda lost and time is running out please.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    Hi,

     

    I'm not a robot. And I'm not int he same time zone of you. 

     

    So...

     

    Do you know it's not related to my asset? Do you search a little bit on Google, there is a thousand of article about this.

     

    Each case is different... I know it's frustrating but... 

     

    My (aggressive) method : delete your plugin folder.

     

    Reimport everything.

     

    And do what I asked to do at the top of this page.

     

    Cheers ! 

  • 0
    Avatar
    Danny Eeeva

    Alright.. I understand we are not in same zone, but I am trying to not get even more frustrated. I have tried my things I found online and even created topics on unity and stackoverflow, but nothing yet. 

    I appreciate your support thus far, and ask that you see me through this.. I have trusted you to doing so even before I purchased the source

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    I totally understand you! Trust me! 

     

    Everybody knows this frustration.

     

    Stackoverflow? You will have a duplicate topic .. be careful! 

     

    Did you try what I said?

  • 0
    Avatar
    Danny Eeeva

    "be careful?" will I get into trouble for that? And what kind of trouble?

    Meanwhile, I am trying to re-extract the source, so I'll delete the plugin folder and readd it.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    Yes if you want to keep the possibility to post, you have to check before create new topic. If guys flag you as duplicate, you will lose it... 

     

    (it happens to me)

     

    yes please let me know 

  • 0
    Avatar
    Danny Eeeva

    ALright... I have added you on skype. Thanks.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    If the problem continue you can try this (for everybody who come here)

    https://github.com/googleads/googleads-mobile-unity/issues/231

  • 0
    Avatar
    Soeren

    Is this related just to Android, or is it also related to iOS ? Developing for iOS, trying to integrate AdMob, and also getting these "Google.JarResolver.ResolutionException" errors.

  • 0
    Avatar
    Gilbert Anthony BAROUCH

    There is no "jar" on iOS...

  • 0
    Avatar
    Dale Neil

    hi, So far great product for someone who is new to unity. The only issue that I have is that when I install the googlemobileads.package....I get the following error

    - Assets/GoogleMobileAds/Platforms/Android/Utils.cs(124,17): error CS0266: Cannot implicitly convert type `Gender' to `GoogleMobileAds.Api.Gender'. An explicit conversion exists (are you missing a cast?)

     

    Any suggestions?

     

    Thanks

  • 0
    Avatar
  • 0
    Avatar
    Hassan Gulzar

    Hi!

    I'm stuck with two related issues: I cannot get a successful build due to the following error:

    Issue #1: Gradle build fails due to Chartboost's AndroidManifest

    CommandInvokationFailure: Gradle build failed. 
    C:/Program Files/Java/jdk1.8.0_144\bin\java.exe -classpath "E:\Program Files\Unity\2017.1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"

    stderr[
    D:\Projects\UnityLocal\my_company\my_game\Temp\gradleOut\ChartboostSDK\build\intermediates\bundles\release\aapt\AndroidManifest.xml:26:28-65: AAPT: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').


    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':ChartboostSDK:processReleaseResources'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Android\android-sdk\build-tools\26.0.1\aapt.exe'' finished with non-zero exit value 1

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    ]
    stdout[
    Observed package id 'add-ons;addon-unknown-unknown-23' in inconsistent location 'E:\Android\android-sdk\add-ons\addon-google_apis-google-23' (Expected 'E:\Android\android-sdk\add-ons\addon-unknown-unknown-23')
    Observed package id 'system-images;android-23;default;armeabi-v7a' in inconsistent location 'E:\Android\android-sdk\system-images\android-23\armeabi-v7a' (Expected 'E:\Android\android-sdk\system-images\android-23\default\armeabi-v7a')
    Incremental java compilation is an incubating feature.
    :preBuild UP-TO-DATE
    :preReleaseBuild UP-TO-DATE
    :checkReleaseManifest
    :preDebugBuild UP-TO-DATE
    :ChartboostSDK:preBuild UP-TO-DATE
    :ChartboostSDK:preReleaseBuild UP-TO-DATE
    :ChartboostSDK:compileReleaseNdk UP-TO-DATE
    :ChartboostSDK:compileLint
    :ChartboostSDK:copyReleaseLint UP-TO-DATE
    :ChartboostSDK:mergeReleaseProguardFiles UP-TO-DATE
    :ChartboostSDK:packageReleaseRenderscript UP-TO-DATE
    :ChartboostSDK:checkReleaseManifest
    :ChartboostSDK:prepareReleaseDependencies
    :ChartboostSDK:compileReleaseRenderscript
    :ChartboostSDK:generateReleaseResValues UP-TO-DATE
    :ChartboostSDK:generateReleaseResources
    :ChartboostSDK:packageReleaseResources
    :ChartboostSDK:compileReleaseAidl
    :ChartboostSDK:generateReleaseBuildConfig
    :ChartboostSDK:mergeReleaseShaders
    :ChartboostSDK:compileReleaseShaders
    :ChartboostSDK:generateReleaseAssets
    :ChartboostSDK:mergeReleaseAssets
    :ChartboostSDK:processReleaseManifest
    :ChartboostSDK:processReleaseResources FAILED

    BUILD FAILED

    Total time: 5.979 secs
    ]
    exit code: 1
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
    UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.HostView:OnGUI()

    Issue #2: Unable to get the jar resolved successfully:
    ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-ads-lite:[11.0.4]
    Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep)
    Google.JarResolver.PlayServicesSupport.ResolveDependencies (Boolean useLatest)
    GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation) (at Assets/PlayServicesResolver/Editor/ResolverVer1_1.cs:60)
    GooglePlayServices.PlayServicesResolver.MenuResolve () (at Assets/PlayServicesResolver/Editor/PlayServicesResolver.cs:144)
  • 0
    Avatar
    piyush vishwakarma

    I had the same issue and I think it's solved now.

    Open AdMobDependencies.cs file, located inside of Assets -> GoogleMobileAds -> Editor, with your text editor and find the line in SetupDeps() method:

    Google.VersionHandler.InvokeInstanceMethod(svcSupport, "DependOn", new object[] { "com.google.android.gms", "play-services-ads", "LATEST" },

    Now change the string "LATEST" to "9.0.0". That worked for me, hope it helps someone.

     

  • 0
    Avatar
    piyush vishwakarma

    also you find popup comes where you keep it.

     

Please sign in to leave a comment.
Powered by Zendesk