Bug 8619 - Cannot binding AdMob 6.2.1 jar
Summary: Cannot binding AdMob 6.2.1 jar
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2012-11-27 14:46 UTC by Chris Hardy [MSFT]
Modified: 2012-11-28 05:35 UTC (History)
1 user (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 FIXED

Description Chris Hardy [MSFT] 2012-11-27 14:46:25 UTC
When trying to bind the AdMob 6.2.1 jar file, you get the following exception: 
java.lang.TypeNotPresentException: Type com.google.ads.internal.state.AdState not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at sun.reflect.generics.repository.FieldRepository.getGenericType(FieldRepository.java:85)
	at java.lang.reflect.Field.getGenericType(Field.java:236)
	at jar2xml.JavaClass.doAppendField(JavaClass.java:182)
	at jar2xml.JavaClass.appendField(JavaClass.java:168)
	at jar2xml.JavaClass.doAppendToDocument(JavaClass.java:627)
	at jar2xml.JavaClass.appendToDocument(JavaClass.java:469)
	at jar2xml.JavaPackage.appendToDocument(JavaPackage.java:72)
	at jar2xml.Start.main(Start.java:115)
Caused by: java.lang.ClassNotFoundException: com.google.ads.internal.state.AdState
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
	... 13 more
error J2X0002: API analyzer failed with java exception. See verbose output for details.

Which doesn't allow you bind the library.
Comment 1 Atsushi Eno 2012-11-28 05:35:04 UTC
This is now "fixed" in our master sources. It is not our bug, but proguard bug that failed to remap names in generic type parameters to obfuscated ones. The "fix" recovers from those Java-level exception and falls back to non-generic type retrieval, which is sort of "incorrect" but "works" (as java generics are gone anyways).

[jar2xml fbc595d][monodroid master 5719bfb]