刚毅的馒头
4 月前 |
Recently I’ve just updated one of my apps and Google has show me this message:
Warning
The developer of androidx.fragment:fragment (androidx.fragment:fragment) has reported version 1.0.0 as outdated. Consider upgrading to one of the following versions before publishing a new release: 1.1.0+.
please help me
Learn more about the SDKs that you’re using and make informed SDK choices with Google Play SDK Index 2 .
Mine magically disappeared.
I did change a few unrelated things, just not sure which one solved the issue.
Mine magically disappeared.
I did change a few unrelated things, just not sure which one solved the issue.
Hi guys, I have fixed it by applying the above solution, I am using Firebase so I added this line
to AnalyticsDependencies.xml located in \Assets\Firebase\Editor
Good luck.
ahmed_ameen2:
Hi guys, I have fixed it by applying the above solution, I am using Firebase so I added this line
to AnalyticsDependencies.xml located in \Assets\Firebase\Editor
Good luck.
I try it but the Google Play Console still warning me!
ahmed_ameen2:
Hi guys, I have fixed it by applying the above solution, I am using Firebase so I added this line
to AnalyticsDependencies.xml located in \Assets\Firebase\Editor
Good luck.
How you fixed it please let me know make a small video
The reason for me is / was the
Google Play Game Services
(v0.11.01).
Play Services Source:
https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/current-build
The Google Play Services package has not seen a new release within the last year. I find it disturbing that they show a warning in the console while they do not update their own package to prevent said warning. Seems like those two teams are not communicating. Maybe someone from Unity could go poke them so they update the package.
Here is the gradle dependencies graph (notice the outdated androidx.fragment:fragment:1. 0 .0 instead of the recommended 1. 1 .0). Created following this guide . The “dependencies” command is very useful to find out where exactly it is coming from.
Task :unityLibrary:dependencies
±--
com.google.games:gpgs-plugin-support:0.11.01
| ±-- com.google.android.gms:play-services-games-v2:17.0.0
| | ±-- com.google.android.gms:play-services-base:18.0.1
| | | ±-- androidx.collection:collection:1.0.0
| | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | ±-- androidx.core:core:1.2.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | ±-- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.arch.core:core-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | -– androidx.versionedparcelable:versionedparcelable:1.1.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | -– androidx.collection:collection:1.0.0 (
)
| | | ±--
androidx.fragment:fragment:1.0.0
| | | | ±-- androidx.core:core:1.0.0 → 1.2.0 (
)
| | | | ±-- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 (
)
| | | | | ±-- androidx.legacy:legacy-support-core-utils:1.0.0
| | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 (
)
| | | | | | ±-- androidx.documentfile:documentfile:1.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.loader:loader:1.0.0
| | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 (
)
| | | | | | | ±-- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | | | | | ±-- androidx.arch.core:core-runtime:2.0.0
| | | | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | | | -– androidx.arch.core:core-common:2.0.0 (
)
| | | | | | | | ±-- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0 (
)
| | | | | | | | | ±-- androidx.arch.core:core-common:2.0.0 (
)
| | | | | | | | | -– androidx.arch.core:core-runtime:2.0.0 (
)
| | | | | | | | -– androidx.arch.core:core-common:2.0.0 (
)
| | | | | | | -– androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
tessellation:
Have you tried adding a dependency to a newer version of the library using an EDM4U Dependencies.xml file ?
This will override older versions that other android libraries depend upon.
** @tessellation 's solution is working.**
Step by step guide:
Create a folder Assets/Editor
Add a file (name ending with “Dependencies.xml”). I Chose “OverrideDependencies.xml”
Content of the file:
<!-- see https://discussions.unity.com/t/922516/3 -->
<dependencies>
<androidPackages>
<repositories>
<repository>https://repo.maven.apache.org/maven2</repository>
</repositories>
<androidPackage spec="androidx.fragment:fragment:1.1.0" />
</androidPackages>
</dependencies>
Force resolve with the dependency mananger from google (formerly jar resolver):
If you are using GameService you may have to apply this fix too.
The reason for me is / was the Google Play Game Services (v0.11.01).
Play Services Source: play-games-plugin-for-unity/current-build at master · playgameservices/play-games-plugin-for-unity · GitHub
The Google Play Services package has not seen a new release within the last year. I find it disturbing that they show a warning in the console while they do not update their own package to prevent said warning. Seems like those two teams are not communicating. Maybe someone from Unity could go poke them so they update the package.
Here is the gradle dependencies graph (notice the outdated androidx.fragment:fragment:1.0.0 instead of the recommended 1.1.0). Created following this guide. The “dependencies” command is very useful to find out where exactly it is coming from.
Task :unityLibrary:dependencies
Project :unityLibrary
±-- com.google.games:gpgs-plugin-support:0.11.01
| ±-- com.google.android.gms:play-services-games-v2:17.0.0
| | ±-- com.google.android.gms:play-services-base:18.0.1
| | | ±-- androidx.collection:collection:1.0.0
| | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | ±-- androidx.core:core:1.2.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | ±-- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.arch.core:core-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | -– androidx.versionedparcelable:versionedparcelable:1.1.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | -– androidx.collection:collection:1.0.0 ()
| | | ±-- androidx.fragment:fragment:1.0.0
| | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | ±-- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | ±-- androidx.legacy:legacy-support-core-utils:1.0.0
| | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | | ±-- androidx.documentfile:documentfile:1.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.loader:loader:1.0.0
| | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | | | ±-- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | | | | | ±-- androidx.arch.core:core-runtime:2.0.0
| | | | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | | | -– androidx.arch.core:core-common:2.0.0 ()
| | | | | | | | ±-- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0 ()
| | | | | | | | | ±-- androidx.arch.core:core-common:2.0.0 ()
| | | | | | | | | -– androidx.arch.core:core-runtime:2.0.0 ()
| | | | | | | | -– androidx.arch.core:core-common:2.0.0 ()
| | | | | | | -– androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
** @tessellation 's solution is working.**
Step by step guide:
Create a folder Assets/Editor
Add a file (name ending with “Dependencies.xml”). I Chose “OverrideDependencies.xml”
Content of the file:
<!-- see https://discussions.unity.com/t/922516/3 -->
<dependencies>
<androidPackages>
<repositories>
<repository>https://repo.maven.apache.org/maven2</repository>
</repositories>
<androidPackage spec="androidx.fragment:fragment:1.1.0" />
</androidPackages>
</dependencies>
Force resolve with the dependency mananger from google (formerly jar resolver):
If you are using GameService you may have to apply this fix too.
I try your methods but It is still showing the Google Play Console Error
Have you tried using the gradle “dependencies” command to check where the dependency is coming from? You can run the command on the created gradle file in the build and it will show you the source.
Also, Google did show the warning for me even after upgrading. That’s when I noticed that they are also checking any old alpha or beta releases. It’s a bit confusing but maybe your build is already fine and it’s just an old beta that’s causing it.
From youtube, you need add constraints.implementation 'androidx.fragment:fragment:1.3.6'
to mainTemplate.gradle
The dependency list in mainTemplate.gradle is actually generated by the Android Resolver and adding something into that list might result in it being overridden next time the resolver runs (maybe if you add it outside the Android Resolver comments it won’t be erased depending on whether your gradle file is set to be auto-generated or not, haven’t tested)
See how on each dependency line in the gradle file there’s a commented out XML dependency file name? This actually ties in with the solution posed by tesselation and geo – these dependencies are actually being parsed from the Assets/*Dependency.XML files listed.
I added my own Assets/Editor/MyDependencies.xml and then ran the resolver (Assets → External Dependency Manager → Android Resolver → Force resolve) and checked mainTemplate.gradle, and the androidx.fragment dependency override appeared in the same spot as in restush96’s post. So I’d advise taking the XML approach instead!
The reason for me is / was the Google Play Game Services (v0.11.01).
Play Services Source: play-games-plugin-for-unity/current-build at master · playgameservices/play-games-plugin-for-unity · GitHub
The Google Play Services package has not seen a new release within the last year. I find it disturbing that they show a warning in the console while they do not update their own package to prevent said warning. Seems like those two teams are not communicating. Maybe someone from Unity could go poke them so they update the package.
Here is the gradle dependencies graph (notice the outdated androidx.fragment:fragment:1.0.0 instead of the recommended 1.1.0). Created following this guide. The “dependencies” command is very useful to find out where exactly it is coming from.
Task :unityLibrary:dependencies
Project :unityLibrary
±-- com.google.games:gpgs-plugin-support:0.11.01
| ±-- com.google.android.gms:play-services-games-v2:17.0.0
| | ±-- com.google.android.gms:play-services-base:18.0.1
| | | ±-- androidx.collection:collection:1.0.0
| | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | ±-- androidx.core:core:1.2.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | ±-- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.arch.core:core-common:2.0.0
| | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | -– androidx.versionedparcelable:versionedparcelable:1.1.0
| | | | ±-- androidx.annotation:annotation:1.1.0
| | | | -– androidx.collection:collection:1.0.0 ()
| | | ±-- androidx.fragment:fragment:1.0.0
| | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | ±-- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | ±-- androidx.legacy:legacy-support-core-utils:1.0.0
| | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | | ±-- androidx.documentfile:documentfile:1.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | ±-- androidx.loader:loader:1.0.0
| | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | ±-- androidx.core:core:1.0.0 → 1.2.0 ()
| | | | | | | ±-- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | | | | | ±-- androidx.arch.core:core-runtime:2.0.0
| | | | | | | | | ±-- androidx.annotation:annotation:1.0.0 → 1.1.0
| | | | | | | | | -– androidx.arch.core:core-common:2.0.0 ()
| | | | | | | | ±-- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | | | | | ±-- androidx.lifecycle:lifecycle-common:2.0.0 ()
| | | | | | | | | ±-- androidx.arch.core:core-common:2.0.0 ()
| | | | | | | | | -– androidx.arch.core:core-runtime:2.0.0 ()
| | | | | | | | -– androidx.arch.core:core-common:2.0.0 ()
| | | | | | | -– androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | | | | | -– androidx.annotation:annotation:1.0.0 → 1.1.0
** @tessellation 's solution is working.**
Step by step guide:
Create a folder Assets/Editor
Add a file (name ending with “Dependencies.xml”). I Chose “OverrideDependencies.xml”
Content of the file:
<!-- see https://discussions.unity.com/t/922516/3 -->
<dependencies>
<androidPackages>
<repositories>
<repository>https://repo.maven.apache.org/maven2</repository>
</repositories>
<androidPackage spec="androidx.fragment:fragment:1.1.0" />
</androidPackages>
</dependencies>
Force resolve with the dependency mananger from google (formerly jar resolver):
If you are using GameService you may have to apply this fix too.
It works. Thank you guys.
but in my case helped this dependency file
<dependencies>
<androidPackages>
<androidPackage spec="androidx.fragment:fragment:1.1.0">
<androidSdkPackageIds>
<androidSdkPackageId>extra-google-m2repository</androidSdkPackageId>
</androidSdkPackageIds>
</androidPackage>
</androidPackages>
</dependencies>
And IMPORTANT things to do is:
Force Resolve (Assets > External Dependency Manager > Android Resolver > Force Resolve)
Then remove {yourProject}/Libraries/Bee/Android folder
Build
Cheers. Hope it will help