简体   繁体   中英

How to fix “No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')”

I am getting the following error when I build my Android App project in Visual studio 2015.

No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')

These lines are located under:

obj\Debug\android\manifest\AndroidManifest.xml

There is 3 entires of it inside the AndroidManifest file .

I have downloaded the google play service from the SDK Manager .

Should I reference anything to my solution?

I already has Xamarin.GooglePlayServices.Base, Xamarin.GooglePlayServices.Basement, Xamarin.GooglePlayServices.Maps Referenced.

Thanks.

你已经在value文件夹中创建了integer.xml文件,并将你的Integer定义到那个地方它将解决你的问题。

Try doing and a clean all and check that ALL the content under the obj has been deleted and then perform a build all.

If that does not work:

I would try removing the ~GooglePlayServices~ nugets/references and re-add just the Xamarin.GooglePlayServices.Maps nuget which will bring in the ~Basement and ~Base libraries.

You should end up with a generated manifest that only has one reference to google_play_services_version and that resource should be picked up from Debug/android/XXX/YYYYYY/ZZZZZ/R.java:

ie

public static final int google_play_services_version=0x7f070000;

I added several new packages. One of the package is the reason of the error. I have to check one by one and caught the one causing error. Removing that package is all I need to do to resolve the error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM