How to fix the package name of xamarin android binding?

mc 3,701 Reputation points
2021-04-19T00:41:58.957+00:00

The package name is com.xxx.A.2ND

it is number first

I know how to fix the method name with the number first

<attr path="/api/package[@name='com.someapp.android.mpa.guidance']/
    interface[@name='NavigationManager.Listener']/
    method[@name='on2DSignNextManeuver']" 
    name="argsType">NavigationManager.TwoDSignNextManueverEventArgs</attr>

but it is the package name how to fix it?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,661 Reputation points Microsoft Vendor
    2021-04-22T02:13:31.92+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    You can try to add following <attr> tag in the metadata.xml

       <attr path="/api/package[@name='com.xxx.A.2ND']" name="managedName">com.xxx.A.SecondND</attr>  
    

    You can refer to this document about changing the name of a package, class, method, or parameter : https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata#managedname

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful