Bug 29507 - Code generated by bindings is missing '$' between class name and interface name
Summary: Code generated by bindings is missing '$' between class name and interface name
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.20.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2015-04-28 19:57 UTC by Ian Leatherbury
Modified: 2016-08-08 07:41 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ian Leatherbury 2015-04-28 19:57:16 UTC
The code that is dumped out in the java files generated are missing the $ between the class name and interface name.

Steps to reproduce:
See attached project. 
1. Attempt to build the Android app 'TestProject'.
2. Note 3 errors.
3. Click on one of the to be taken to said .java file.

=== Xamarin Studio ===

Version 5.8.3 (build 1)
Installation UUID: 5eae629a-fba3-47fc-9890-740078197c13
	Mono 3.12.1 ((detached/0849ec7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010003

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/ian/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: f7736a4
Build date: 2015-04-09 04:22:08-0400

=== Xamarin.Mac ===

Version: (Business Edition)

=== Build Information ===

Release ID: 508030001
Git revision: 6e8e725e0d689351901c2c70453bfa4ea25e293b
Build date: 2015-04-06 20:31:47-04
Xamarin addins: 051cd5f8c1b5dbfc87eaef80a74aec03f34c60a8

=== Operating System ===

Mac OS X 10.10.2
Darwin Ians-MacBook-Pro-2.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 1 Ian Leatherbury 2015-04-28 19:59:12 UTC
Test case was too big too attach. It is available on my dropbox here: https://www.dropbox.com/s/wx5d5obiap049mq/MitekDroidBinding.zip?dl=0
Comment 3 Atsushi Eno 2015-04-30 01:11:34 UTC
In Java source no one should use $ as part of the name. We never use it as the generated name either. $ in a type name or a JNI symbol means it is a nested type.

There is no Java API information about the jar included in the project so I have no idea in general, but is this 'org.apache.sanselan.common.mylzw.MyLZWCompressor$Listener' or MyLZWCompressor a public class? If not, it won't be found by the Java compiler and it will just result in "symbol not found" error.

Maybe this interface should not have been exposed in the generated code, so specifying <remove-node /> for <implements> elements that specifies this Listener class (or interface) would fix the issue.
Comment 4 Atsushi Eno 2016-08-08 07:41:08 UTC
marking as NORESPONSE.