Bug 44077 - BINDINGSGENERATOR : warning BG8604: top ancestor xxx not found for nested type yyy
Summary: BINDINGSGENERATOR : warning BG8604: top ancestor xxx not found for nested typ...
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 6.1.1 (C7SR0)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2016-09-08 04:27 UTC by James
Modified: 2016-09-08 09:47 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED INVALID

Description James 2016-09-08 04:27:23 UTC
Here's the binding project source: https://github.com/jamesatgithub/GPrinterDroidBinding
It compiled ok but with warning in VS Output which leads to a vital class of GpPrintService is missing from the binding output dll. I guess it could be caused by the reason that the android native service is AIDL based and there is a nested type in the GPPrintService.java This is screenshot of the decompile of the class: https://gyazo.com/c811e636cd4857d9380925bdbfcb4400

Below is the VS Output:
Solution is not saved. Please save your solution before managing NuGet packages.
1>------ Rebuild All started: Project: GPrinterDroidBinding, Configuration: Debug Any CPU ------
1>JARTOXML : warning J2X9001: Couldn't load class com/gprinter/service/GpPrintService$1 : java.lang.NoClassDefFoundError: com/gprinter/aidl/GpService$Stub
1>JARTOXML : warning J2XA006: missing class error was raised while reflecting com.gprinter.printer.PrinterManager : com/gprinter/aidl/GpService
1>JARTOXML : warning J2XA006: missing class error was raised while reflecting com.gprinter.service.GpPrintService : com/gprinter/aidl/GpService$Stub
1>JARTOXML : warning J2XA006: missing class error was raised while reflecting com.gprinter.service.GpPrintService$1$1 : com/gprinter/aidl/GpService$Stub
1>BINDINGSGENERATOR : warning BG8604: top ancestor PrinterManager not found for nested type Com.Gprinter.Printer.PrinterManager.1.
1>BINDINGSGENERATOR : warning BG8604: top ancestor GpPrintService not found for nested type Com.Gprinter.Service.GpPrintService.2.
1>BINDINGSGENERATOR : warning BG8604: top ancestor GpPrintService not found for nested type Com.Gprinter.Service.GpPrintService.3.
1>BINDINGSGENERATOR : warning BG8604: top ancestor GpPrintService not found for nested type Com.Gprinter.Service.GpPrintService.3.1.
1>BINDINGSGENERATOR : warning BG8604: top ancestor GpPrintService not found for nested type Com.Gprinter.Service.GpPrintService.3.1.1.
1>BINDINGSGENERATOR : warning BG8604: top ancestor GpPrintService not found for nested type Com.Gprinter.Service.GpPrintService.4.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method OpenXmlResourceParser in managed type Android.Content.Res.AssetManager.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method OpenXmlResourceParser in managed type Android.Content.Res.AssetManager.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method GetAnimation in managed type Android.Content.Res.Resources.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method CreateFromXml in managed type Android.Content.Res.ColorStateList.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method GetLayout in managed type Android.Content.Res.Resources.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method GetXml in managed type Android.Content.Res.Resources.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method ParseBundleExtras in managed type Android.Content.Res.Resources.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method CreateFromXml in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method CreateFromXml in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method CreateFromXmlInner in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method CreateFromXmlInner in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method Inflate in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method Inflate in managed type Android.Graphics.Drawables.Drawable.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method ParseIntent in managed type Android.Content.Intent.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method ReadFromXml in managed type Android.Content.IntentFilter.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method GetXml in managed type Android.Content.PM.PackageManager.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type System.Xml.XmlReader in method LoadXmlMetaData in managed type Android.Content.PM.PackageItemInfo.
1>BINDINGSGENERATOR : warning BG8900: Type com.gprinter.jni.Jni: FxDG naming violation: Type name 'Jni' matches namespace part 'Jni'.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method Inflate in managed type Android.Views.LayoutInflater.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type System.Xml.XmlReader in method Inflate in managed type Android.Views.LayoutInflater.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type com.gprinter.printer.PrinterManager in method GetmPrinterManager in managed type Com.Gprinter.Service.AllService.
1>BINDINGSGENERATOR : warning BG8800: Unknown parameter type com.gprinter.printer.PrinterManager in method SetmPrinterManager in managed type Com.Gprinter.Service.AllService.
1>BINDINGSGENERATOR : warning BG8700: Unknown return type com.lidroid.xutils.DbUtils in method GetDB in managed type Com.Gprinter.Util.DBUtil.
1>BINDINGSGENERATOR : warning BG8401: Skipping Com.Gprinter.Model.DeviceInfoModel.Printer, due to a duplicate field, method or nested type name.

========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Comment 1 James 2016-09-08 04:29:39 UTC
The AIDL looks like below:

package com.gprinter.aidl;
interface GpService{  
	int openPort(int PrinterId,int PortType,String DeviceName,int PortNumber);
	void closePort(int PrinterId);
	int getPrinterConnectStatus(int PrinterId);
	int printeTestPage(int PrinterId);   
  	void queryPrinterStatus(int PrinterId,int Timesout,int requestCode);
  	int getPrinterCommandType(int PrinterId);
	int sendEscCommand(int PrinterId, String b64);
  	int sendLabelCommand(int PrinterId, String  b64);
	void isUserExperience(boolean userExperience);
	String getClientID();
	int setServerIP(String ip, int port);
}
Comment 2 Atsushi Eno 2016-09-08 09:47:53 UTC
I have no idea why you thought packaging .aidl works, but it is mere a source file, not a class, and no valid Java processors will handle it. You need to package compiled Java classes for that AIDL.