Bug 10290 - error jni in binding java project
Summary: error jni in binding java project
Status: RESOLVED FEATURE
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-02-14 03:04 UTC by v.chianese
Modified: 2013-02-15 14:29 UTC (History)
1 user (show)

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


Attachments
the jar of binding (84.08 KB, application/octet-stream)
2013-02-14 03:04 UTC, v.chianese
Details


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 FEATURE

Description v.chianese 2013-02-14 03:04:34 UTC
Created attachment 3369 [details]
the jar of binding

Error 30 The best overloaded method match for 'Android.Runtime.JNIEnv.SetField(System.IntPtr, System.IntPtr, double)' has some invalid arguments C:\Progetti\test\AndroidApplication5\BindingLibrary1\obj\Debug\generated\src\Com.Ftdi.J2xx.D2xxManager.cs 510 6 BindingLibrary1
Comment 1 Atsushi Eno 2013-02-14 03:33:06 UTC
Please make sure to provide your reproducible project. I am sure you should have edited Metadata.xml to get less compile errors, otherwise it won't compile up to get any error like that. Thanks.
Comment 2 v.chianese 2013-02-14 04:07:20 UTC
no i don't have edited metadata.xml
Comment 3 Atsushi Eno 2013-02-15 14:29:18 UTC
Ah, ok I misunderstood you, you quoted just one out of those bunch of build errors. It's not a bug, you get those errors because there is a "handle" field which became "Handle" property and hence conflicted with Java.Lang.Object.Handle property (managed-only property). Hence you need to use this kind of metadata.xml - it renamed Handle property as HandleField property:

<metadata>
  <attr path="/api/package[@name='com.ftdi.j2xx']/class[@name='D2xxManager.FtDeviceInfoListNode']/field[@name='handle']" name="managedName">HandleField</attr>
</metadata>

I verified this jar binding builds with 4.4.55.