简体   繁体   中英

Binding an .AAR in Xamarin Android name does not exist

I'm trying to add this library to Xamarin project.

I'm following Xamarin guide and going through binding an .AAR steps. Now I'm stack on step accessing types .

I added binding library to project references and can see that

NamespaceMapping (Java = "com.antonyt.infiniteviewpager.library", Managed = "Com.Antonyt.Infiniteviewpager.Library")]

but when I use

using Com.Antonyt.Infiniteviewpager.Library;

in one of my activities it still not recognise the name.

Binding Library Build Action is LibraryProjectZip .

What could cause this problem?

BuildAction for aar is LibraryProjectZip and this is OK. Does your project compile? I assume yes, because you have not mentioned any errors. Sometimes warnings might put some light on why some types are missing (java generics, obfuscated types etc).

Without more info it will be difficult to help you.

Few questions to start:

  1. Is api.xml generated? Are your types you need there?
  2. Which version of java do you have? Avoid 1.8. Use 1.7.

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