Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Play Service Resolver Failed in Unity 2018.1.0b5 #172

Open
somnus0x opened this issue Mar 11, 2018 · 9 comments
Open

Google Play Service Resolver Failed in Unity 2018.1.0b5 #172

somnus0x opened this issue Mar 11, 2018 · 9 comments

Comments

@somnus0x
Copy link

When I install the GoogleAnalyticV4 package in unity the following error code appear

`Resolution failed

Failed to fetch the following dependencies:
com.google.android.gms:play-services-analytics:LATEST

UnityEngine.Debug:LogError(Object)
GooglePlayServices.PlayServicesResolver:LogDelegate(String, LogLevel)
Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean)
GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List1) GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey18:<>m__28(List1)
GooglePlayServices.c__AnonStorey14:<>m__20(Result)
GooglePlayServices.c__AnonStorey15:<>m__2B()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()`

`Gradle failed to fetch dependencies.

Failed to run 'Temp/PlayServicesResolverGradle/gradlew -b Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle --no-daemon "-PANDROID_HOME=/Users/almagest/Library/Android/sdk" "-PTARGET_DIR=/Users/almagest/Development/Unity Project/Google Analytic No Bitcode/Assets/Plugins/Android" "-PMAVEN_REPOS=https://maven.google.com" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-analytics:+"'
stdout:

stderr:

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine java version from '9.0.4'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

exit code: 1

UnityEngine.Debug:LogError(Object)
GooglePlayServices.PlayServicesResolver:LogDelegate(String, LogLevel)
Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean)
GooglePlayServices.c__AnonStorey14:<>m__20(Result)
GooglePlayServices.c__AnonStorey15:<>m__2B()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()`

@Artemu25
Copy link

Artemu25 commented Jun 6, 2018

I have the simallar problem. After importing the package into empty project getting this error.

Resolution failed

Failed to fetch the following dependencies:
com.google.android.gms:play-services-base:16.0.0@aar
com.google.android.gms:play-services-basement:16.0.0@aar
com.google.android.gms:play-services-measurement-base:16.0.0@aar
com.google.android.gms:play-services-stats:16.0.0@aar
com.google.android.gms:play-services-ads-identifier:16.0.0@aar
com.google.android.gms:play-services-tasks:16.0.0@aar

Also get Warning.
Some conflicting dependencies were found.
The following dependency versions were modified:
com.google.android.gms:play-services-base:15.0.1 --> com.google.android.gms:play-services-base:16.0.0
com.google.android.gms:play-services-basement:15.0.1 --> com.google.android.gms:play-services-basement:16.0.0
com.google.android.gms:play-services-measurement-base:15.0.4 --> com.google.android.gms:play-services-measurement-base:16.0.0
com.google.android.gms:play-services-stats:15.0.1 --> com.google.android.gms:play-services-stats:16.0.0
com.google.android.gms:play-services-ads-identifier:15.0.1 --> com.google.android.gms:play-services-ads-identifier:16.0.0
com.google.android.gms:play-services-tasks:15.0.1 --> com.google.android.gms:play-services-tasks:16.0.0

@supasonk Have you found a solution?

@somnus0x
Copy link
Author

@Artemu25 I solve this problem by look in to others plugin. Unity won't allow multiple play-service aar. In the same project.

@s4relok
Copy link

s4relok commented Jun 16, 2018

After importing the package into empty project getting this error as well.

Unity version: 2017.4.2f2

Tried to update SDKs, reimport, nothing helps.

Resolution failed

Failed to fetch the following dependencies:
com.google.android.gms:play-services-ads-identifier:16.0.1
com.google.android.gms:play-services-base:16.0.1
com.google.android.gms:play-services-basement:16.0.1
com.google.android.gms:play-services-measurement-base:16.0.1
com.google.android.gms:play-services-stats:16.0.1
com.google.android.gms:play-services-tasks:16.0.1

UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List1) GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey4:<>m__1(List1)
GooglePlayServices.c__AnonStorey0:<>m__0(Result)
GooglePlayServices.c__AnonStorey1:<>m__0()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

@c-andrews
Copy link

c-andrews commented Jun 28, 2018

Is there a resolution to this as I am facing the same issue?

@jnbt
Copy link

jnbt commented Jul 11, 2018

I get the same issues. Some part of the resolution doesn't seem to work when using LASTEST in GoogleAnalyticsDependencies.xml.

My 5 cents

When using LASTEST the most recent version of com.google.android.gms:play-services-analytics is being used (at the time of writing 16.0.1). When you look at the Maven page you will see clearly that this depends on play-services-base in version 15.0.1 (NOT 16.0.1).
The resolution seems to fail in this particular case.

My solution

By hardcoding version 12.0.1 via Assets/GoogleAnalytic/GoogleAnalyticsDependencies.xml the issue is solved:

<dependencies>
  <!-- Android dependencies are specified under the "androidPackages" element.
       Each "androidPackage" element contains the attributes of an Android
       dependency (e.g AAR, JAR reference). -->
  <androidPackages>
    <!-- The "spec" attribute is *required* and provides the Maven package
         specification.

         Currently this only supports group:artifact:version_specification where
         group:artifact:version_specification references a Maven package that
         can be located in:
         * Maven central.
         * Google's Maven repo.
         * Local Android SDK Maven repo.

         Additional repositories can be added using the "repositories" element.
    -->
    <androidPackage spec="com.google.android.gms:play-services-analytics:12.0.1">
      <!-- androidSdkPackageIds is optional and contains the set of Android
           SDK package manager components (packages) this package requires.

           If the package can't be found in any of the specified repositories,
           the dependency resolver will attempt to install the set of Android
           SDK packages specified here and then attempt resolution again.
      -->
      <androidSdkPackageIds>
        <androidSdkPackageId>extra-google-m2repository</androidSdkPackageId>
      </androidSdkPackageIds>
      <!-- "repositories" are optional and contain the set of additional
           repository URIs to search for this package. -->
      <repositories>
        <repository>https://maven.google.com</repository>
      </repositories>
    </androidPackage>
  </androidPackages>
</dependencies>

@jeeteshb
Copy link

jeeteshb commented Aug 6, 2018

@jnbt
Hi I have done the

But still getting the below error for Android Project. Any help on the same will be really appreciated.

Resolution failed

Failed to fetch the following dependencies:
com.google.android.gms:play-services-analytics-impl-license:15.0.1
com.google.android.gms:play-services-analytics-impl:15.0.1
com.google.android.gms:play-services-analytics-license:15.0.1
com.google.android.gms:play-services-analytics:15.0.1
com.google.android.gms:play-services-tagmanager-v4-impl-license:15.0.1
com.google.android.gms:play-services-tagmanager-v4-impl:15.0.1

@jnbt
Copy link

jnbt commented Aug 6, 2018

@jeeteshb I can only assume that your project has some Android dependency loading 15.0.1. Which plugins are you using?

@jeeteshb
Copy link

jeeteshb commented Aug 6, 2018 via email

@gamediajustin
Copy link

We were having the same problems. Using the latest version of PlayServicesResolver (1.2,95 at the moment) instead of the one provided in this repo solved the issue for us. No other changes were needed. The GoogleAnalyticsDependencies could still use LATEST instead of hardcoding a lower version number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants