-
Notifications
You must be signed in to change notification settings - Fork 53
Troubleshooting Android Bindings Issues
Jonathan Pobst edited this page Feb 7, 2024
·
24 revisions
- Helpful Tools - Some helpful tools for investigating. **DIAGNOSTIC MSBUILD LOG IS A MUST**
- Glossary - Some common terms used with binding projects.
- Understanding the Binding Pipeline - Understanding the various steps performed in the binding process can help determine where issues are occurring and how to fix them.
-
Metadata Cheat Sheet - Quick reference for commonly used
metadata
constructs.
- Missing Types or Members - Expected Java types or members are missing from the managed bindings.
- Renaming Namespaces - Changes are desired to namespace names created automatically from Java package names.
-
Renaming Namespaces/Types/Members/Parameters - Name changes are desired, for style reasons or due to
CS1001
/CS0102
compilation errors. -
Covariant Return Types - Class - These generally manifest as a
CS0534
compilation error. -
Covariant Return Types - Interface - These generally manifest as a
CS0738
compilation error. -
Duplicate Events - These generally manifest as a
CS0102
compilation error where the referenced member is a C#event
. -
Duplicate EventArgs Classes - These generally manifest as
CS0111
orCS0112
compilation errors referencingEventArgs
. -
Duplicate Event Handlers - These generally manifest as a
CS0102
compilation error where the referenced member ends inHandler
. -
Incorrect
override
\virtual
Method Modifiers - These generally manifest as aCS0115
compilation error.
Note: Modern development best practices suggest projects should use "warnings as errors" features to ensure that all warnings are rectified. Android bindings projects generally do not play nice with this practice. The tooling will report any Java API that it struggles with as a warning for visibility. In these cases, the API is removed from the binding to ensure the binding compiles and works. The warnings do not affect the correctness of the resulting binding. Unless the removed API is something you need to access from C# it is recommended to ignore the warnings.
- Warning BG8403 - Type name matches namespace name