TorbenK / TK.CustomMap

Extended Map Control
MIT License
142 stars 109 forks source link

error APT0000 google_play_services_version #367

Open TFreudi1 opened 5 years ago

TFreudi1 commented 5 years ago

With the actual VS2019 Version 16.2.0 I get that error as soon as I include TK.CustomMap in an Android Project.

pamela032709 commented 5 years ago

delete the plugin and camarin forms maps if you have it and google ply services from the 3 projects then install it first on android and go from there

Sent from my iPhone

On Jul 25, 2019, at 12:47 PM, TFreudi1 notifications@github.com wrote:

With the actual VS2019 Version 16.2.0 I get that error as soon as I include TK.CustomMap in an Android Project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

TFreudi1 commented 5 years ago

I only have one project and I remove the nuget dependency to TKCustomMap and added it again, but it did'nt help. Here is the sampleproject: GooglePlayErr.zip

endarea commented 5 years ago

@TFreudi1 Did you find a solution to this issue? I have an old project which builds fine even with VS2019 build 21, but anything new I try to add TK.CustomMap to fails. Can't figure out what the difference is.

TFreudi1 commented 5 years ago

No, not really, at first I checked out the whole project but I can't compile it, then I go through the source and add everything to my source and left some parts out (places) that I don't need. Now I have a working iOS and Android project , UWP still have a lot of errors https://github.com/TorbenK/TK.CustomMap/issues/351 The reason why your old project work and an new one not should be the Version of xamarin.forms / xamarin.maps you use. Check your nuget reference in both projects, the will be different. For your new project you have to downgrade that, but with that you loose all new functions of xamarin.forms, that was no option for me.

v-haroha commented 5 years ago

I was dealing with a similar issue. Only for converting vs2017 to vs2019. Steps I took to resolve this 1) Make sure the Google Play SKD tools are installed image

2) I reopened the project in VS 2017, clean/build/ delete obj/bin folders. 3) Verified that app would work in VS2017 4) Open in VS2019 5) Verified that it would work in VS2019

endarea commented 5 years ago

@TFreudi1 Removing the TK library and manually copying the source files works for me too on iOS and Android. Thanks for the tip. The Xamarin.Forms version doesn't make a difference for me though, the same project opens fine on a different computer which has VS2017 installed (as it worked on mine before the upgrade).

@v-haroha How do you keep two versions of VS side by side on the same computer? After the upgrade to VS2019 I got a VS2017(7.8.3.2) dmg file, opened it and though it seems to share all the preferences with VS2019 (e.g. the installed Extras Tools) no project builds with it. Creating even a new solution works only until the "restore packages" step, complaining about The imported project "/Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. at line <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> of the .csproj

Did this ever happen to you?

Gakk commented 4 years ago

Any solution to this, I am also struggling with this error:

AndroidManifest.xml(48): error APT2260: resource integer/google_play_services_version (aka my.package.name:integer/google_play_services_version) not found.

Is the package TK.CustomMap not compatible with the latest Xamarin.Forms update?

damicodorian commented 4 years ago

@Gakk Did you find a solution to this issue ?

TFreudi1 commented 4 years ago

Yes/No, I copy the src files and compile by myself. No solution für nuget.

ChaseFlorell commented 4 years ago

Yes/No, I copy the src files and compile by myself. No solution für nuget.

Submit a pr and I'll upload it to nuget.

TFreudi1 commented 4 years ago

@ChaseFlorell : I have no problem, I use the source, talk to damicodorian, it Looks like he had a problem.

Gakk commented 4 years ago

@Gakk Did you find a solution to this issue ?

No, @damicodorian, I have not found a good solution - but a workaround.

After adding version 60.1142.1 of the following NuGet-packages to my Android project it works (even if building the project displays a warning):

But if anyone has a solution that makes it possible to upgrade the packages to 71.x I would be very happy 😃

The warning I get on build is for every four packages, this is the warnings for the first one:

NU1608: Detected package version outside of dependency constraint: Xamarin.GooglePlayServices.Location 42.1021.1 requires Xamarin.GooglePlayServices.Base (= 42.1021.1) but version Xamarin.GooglePlayServices.Base 60.1142.1 was resolved.

NU1608: Detected package version outside of dependency constraint: Xamarin.GooglePlayServices.Places 42.1021.1 requires Xamarin.GooglePlayServices.Base (= 42.1021.1) but version Xamarin.GooglePlayServices.Base 60.1142.1 was resolved.

Gakk commented 4 years ago

@damicodorian & @TFreudi1; After writing my previous response I started exploring this some more and have found a solution.

Instead of adding the previous mentioned packages with an older versjon, I now add two other packages with the latest version (71.1600.0):

If I try to remove either package I get an warning, but as long as you reference both it seems safe to upgrade to the latest :-)

If you confirm, maybe @ChaseFlorell can close the issue?

scriptBoris commented 3 years ago

@damicodorian и @TFreudi1; После написания моего предыдущего ответа я начал изучать это еще несколько и нашли решение.

Вместо того, чтобы добавлять предыдущие упомянутые пакеты со старым versjon, я теперь добавить два других пакета с последней версией (71.1600.0):

  • Xamarin.GooglePlayServices.Location
  • Xamarin.GooglePlayServices.Places

Если я пытаюсь удалить любой пакет я получаю предупреждение, но до тех пор, как вы ссылаетесь как кажется безопасным для обновления до последней :-)

Если вы подтвердите, может быть@ChaseFlorell вы можете закрыть этот вопрос?

It worked for me, Thanks!