Version: 9.4.1.0 (Visual Studio Community)
Commit: xamarin-android/d16-2/ebd65c9
Android SDK: /Users/Can/Downloads/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 29.0.2
SDK Build Tools Version: 29.0.2
Build Information:
Mono: mono/mono@e6f5369
Java.Interop: xamarin/java.interop@d64ada5
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools@6f6c969
Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
Tue Aug 20 16:57:14 PDT 2019
root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
There is no version of GooglePlayServicesComponents that support AndroidX.
Use AndroidX libs together with GooglePlayServices
Error XA2002: Can not resolve reference: Xamarin.Android.Support.Fragment, referenced by Xamarin.GooglePlayServices.Base. Please add a NuGet package or assembly reference for Xamarin.Android.Support.Fragment, or remove the reference to Xamarin.GooglePlayServices.Base. (XA2002)
needs tirage = black hole
Much needed now!
Xamarin.GooglePlayServices.Maps is dependent on using Android.Support.V4.App. This should be migrated to AndroidX. :(
We are working on it.
Thanks @moljac
Please if there's any workaround, let us know
Hi @moljac I've been struggling to build this branch but it's being hard. Do you have any estimated date to release this?
@rjimenez-icinetic
Do you have any estimated date to release this?
Sorry, but no. 1st we want to release AndroidX. I'm going through API Diffs and it is looong and boring task.
I've been struggling to build this branch but it's being hard.
What is making you problems? Maybe I can help?
Thanks again @moljac ! Firstly, I got the error: "The target 'Default' was not found.". I saw that in master, cake script was using 'ci' target instead, so I changed it to 'ci' and it worked. It generated the GooglePlayServices solution in 'generated' folder. So I tried to build it. But it failed trying to restore nuget packages because it's using AndroidX packages that are not released yet (preview04). I replaced all these dependencies to use the released version (preview02) and nuget restore worked. Now I'm facing many build errors (+200), I need to figure out what's the root cause. Do you think I did well with the workarounds I took so far?
@rjimenez-icinetic
Sorry I forgot "Default" and "preview4". I thought we would release "preview3" sooner, but we did not make it.
200+ errors?
weird. My mac builds are clean.
All working now!
After some rebuilds (don't know why) there were only 3 errors:
@rjimenez-icinetic
No need to thanks me.
Those weird build errors are best solved with git clean -xdf. That should nuke all bin/ and obj/ folders.
If that does not help, next stage is to nuke nuget cache...
Those are my steps before calling for help.
Did you get this type of error?
NU1605: Detected package downgrade: Xamarin.AndroidX.Media from 1.0.1-preview02 to 1.0.1-preview01. Reference the package directly from the project to select a different version.
Xamarin.GooglePlayServices.Cast.Framework -> Xamarin.AndroidX.MediaRouter 1.0.0-preview02 -> Xamarin.AndroidX.Media (>= 1.0.1-preview02)
Xamarin.GooglePlayServices.Cast.Framework -> Xamarin.AndroidX.Media (>= 1.0.0-preview02)
After downgrading the media libs to 1.0.0 preview02, I'm getting NU1605
any update on this
@moljac How can I reference these https://github.com/xamarin/GooglePlayServicesComponents/tree/master_based_androidx after running the sh commands and generating dlls? I put the dll files in References but getting build errors such as "Error JAVAC0000: error: package com.google.android.gms.location does not exist
com.google.android.gms.location.LocationListener
(JAVAC0000) javac"
Any update on AndroidX version of Google Play Service Library.
Any update on AndroidX version of Google Play Service Library.
No, build your own for now
I'm getting the same errors as @hadigityat after successfully building the nuget packages and putting them in a local repo. Specifically errors along the lines of "error: package com.google.android.gms.common.api.GoogleApiClient does not exist
com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks, ContractPlanner.Android C:\Users\danor\Source\Repos\ContractPlanner\ContractPlanner\ContractPlanner.Android\obj\Debug100android\src\crc6434af9c19aa01b597\GoogleApiClientConnectionCallbacksImpl.java 8"
Relevant (I think) versions from my Mac:
Mono version 6.6.0.155
Xamarin.Android version: 10.1.3.7
SDK tools version: 26.1.1
SDK Platform Tools version: 29.0.5
SDK Build Tools Version: 29.0.2
@RedChops The errors I was seeing were cleared after rebuilding the latest repo from https://github.com/xamarin/GooglePlayServicesComponents/tree/master_based_androidx and installing the nugets from the local repo.
Initially I was trying to add dll files to references instead of adding nugets and that may have caused the build errors in my case.
Did you follow the steps on github page and added all the needed nugets from your local source into your project?
I've tried this a couple of times now, the steps I'm taking are:
I've also tried nuking the nuget cache to see if there's some kind of incompatibility there, but the results are the same. I don't know much about the nuget system, so I don't know if I should just be copying the whole repo and loading the nugets from there. I'm currently trying to build the project on my Windows machine, but it takes significantly longer for some reason.
Seems like you're following the steps correctly but are you adding nugets where you configure a source and then add the source from your local nuget folder? Why do you need to copy the nugets to another folder when you can add the folder where the nugets are generated? Nugets should be in ...master_based_androidx/output folder
Try "git clean -xdf" on your mac terminal and redo steps
1)sh ./build.sh --target=binderate && sh ./build.sh --target=libs (which sometimes fails on the libs target)
2)sh ./build.sh --target=nuget && sh ./build.sh --target=samples && sh ./build.sh --target=diff (which always fails on the samples target)
3) Configure the nuget source as the output folder I mentioned above, then add to your project
Okay I've gotten a little further with it. I had to downgrade Xamarin.Build.Download to version 0.7.1, which gets me past all the 'DoesNotExist' errors. I then had to bump the Java max heap size to 2G to get around #293
Now I'm getting: java.lang.IllegalArgumentException: already added : Lcom/google/common/util/concurrent/ListenableFuture; Which I seemed to solve by enabling MultiDex.
Still testing to make sure everything actually worked, but the errors have certainly stopped. I'm copying the entire 'output' folder to my local server as I have several development machines I'd like to be able to use.
@hadigityat @RedChops @aliusman @rjimenez-icinetic
We are moving all our tooling to dotnet tool, so for AndroidX and GPS-FB-androidx you will need:
Cake tool:
dotnet tool uninstall --global Cake.Tool
dotnet tool install --global Cake.Tool --version 0.37.0
Binderator:
dotnet tool uninstall --global Xamarin.AndroidBinderator.Tool
dotnet tool install --global Xamarin.AndroidBinderator.Tool --version 0.4.2
Migration tool:
dotnet tool uninstall --global Xamarin.AndroidX.Migration.Tool
dotnet tool install --global Xamarin.AndroidX.Migration.Tool --version 1.0.0-rc1
Then on windows (I do for ALL repos):
dotnet cake -t=clean ; dotnet cake -t=binderate ; dotnet cake -t=libs ; dotnet cake -t=nuget -v=diagnostic; dotnet cake -t=samples -v=diagnostic
and on mac
dotnet cake -t=clean && dotnet cake -t=binderate && dotnet cake -t=libs && dotnet cake -t=nuget -v=diagnostic && dotnet cake -t=samples -v=diagnostic
nuget target will generate *.nupkgs in ./output/ folder which you can use from local feeds.
samples target has still some issues with R8 and missing java classes (under investigation), because samples (referencing nuget) dows trigger Android Callable Wrappers generation and usually that reveals problems (classes/interfaces) which were skipped by our imperfect tooling for some obscure reasons.
Useful info, thanks! - my build-and-drop-the-dlls-in didn't work.. sort of as above:
error: package com.google.android.gms.maps does not exist
So, I tried it this way instead - it all built ok, and nugets look good, which is great.
But, when I add them to my projects and build, I get the same error (yes, tried full clean etc).
If I downgrade Xamarin.Build.Download to version 0.7.1, as above, then it builds (in the IDE) and runs - thanks!
Any update on this, last package that i need to be able to migrate in order to commit to android x...
Turns out i does support it as i am now able to use it without the migration package.
@euandeas That somehow seems unlikely to me, the latest NuGet version of Xamarin.GooglePlayServices.Basement is still 8 months old and lists Xamarin.Android.Support.v4 as a dependency.. Maybe some build / package artefacts are making it magically work?
@ElteHupkes Maybe, but it seems to be working completely fine. However i am only using Ads.Lite but that still depends on Basement i think
@hadigityat @rjimenez-icinetic @ElteHupkes @RedChops @euandeas @hwd71 @aliusman @umakantgmail
GPS-FB with AndroidX dependencies coming soon!
Those versions are most likely with AndroidX dependencies and I'm working on the new sets of previews and bindings.
Tagged version:
https://github.com/xamarin/GooglePlayServicesComponents/tree/100.20200429-androidx-previews01
Waiting for CI build (cross fingers) and publishing will happen.
Check config.json for versions. The next wave ov updates is already prepared in separate branch
and candence for update will be higher for sure.
Closing this one
Most helpful comment
We are working on it.