Skip to content

Type casting for return type is not correct. Error CS0234: The type or namespace name 'Lang' does not exist in the namespace  #5894

Description

@akalghatgi

Steps to Reproduce

  1. Creating Binding Project
  2. Add koin-core-2.1.0.jar to jar folder and set the Build Action to "EmbeddedJar"
  3. Build
  4. Throws errors.

Expected Behavior

Should build and should create binding for each class

Actual Behavior

Throws multiple error and Binding fails

Version Information

Details

Activity

  1. jpobst commented on Apr 30, 2021

    @jpobst
    Contributor

    Ugh, they have a package called org.koin.java which gets translated to the C# namespace Org.Koin.Java. When we try to cast things to Java.Lang.Object it is trying to resolve it as Org.Koin.Java.Lang.Object which is incorrect.

    The easiest fix is to rename that package to something else using metadata, like this:

    <attr path="/api/package[@name='org.koin.java']" name="managedName">Koin</attr>
    
  2. akalghatgi commented on Apr 30, 2021

    @akalghatgi
    Author

    Hi @jpobst,
    Thanks a lot... renaming has the solved the issue for me... :-)

    Regards,
    Amit

  3. ghost locked as resolved and limited conversation to collaborators on Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: BindingsIssues in Java Library Binding projects.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions