locked
Chartboost Java Binding RRS feed

  • Question

  • User78799 posted

    Hi,

    I'm trying to create a java binding for the Chartboost Library. I'm following that guide: http://developer.xamarin.com/guides/android/advancedtopics/javaintegrationoverview/bindingajavalibrary_(.jar)/

    The project builds fine but I'm missing the main Chartboost class. When looking into the output I see warnings about that class that say: "Unsupported major.minor version 51.0 error". The Internet says have to use a newer version of JRE or JDK. I'm not familiar with this so does anyone know what to do? From the project properties I can only change the android api used, nothing about java versions. Tks.

    François

    Friday, June 5, 2015 4:22 PM

All replies

  • User78799 posted

    This post seems to say that I'm stuck: https://forums.xamarin.com/discussion/2737/how-do-i-bind-a-3rd-party-jar-which-was-built-under-jdk-1-7

    Friday, June 5, 2015 4:27 PM
  • User78799 posted

    I found where to change the JDK being used by xamarin in VS2013 (Tools menu). The warning disapeared but I still don't have the charboost class. I now have plenty of other warnings that I don't understand. I'll keep you posted.

    Friday, June 5, 2015 4:42 PM
  • User78799 posted

    So I can see that Charboost.cs is generated but has warnings saying "new protected member declared in sealed class" for all its members and I guess this is why the Chartboost class in not in the final dll. How can I tell the compiler to change protected to private? Or if I change it myself in the cs file, how can I tell VS to generate the dll with the modified cs files?

    Friday, June 5, 2015 4:54 PM
  • User78799 posted

    Well I just had to roead the article and add this line in Metadata.xml:

    <attr path="/api/package[@name='com.chartboost.sdk']/class[@name='Chartboost']/method[@name='getHostActivity' and count(parameter)=0]" name="visibility">private</attr>

    Moreover the generated cs files show the path, that's great!

    Friday, June 5, 2015 5:03 PM
  • User78799 posted

    Still no luck, the class in not in the dll even after changing protected to private :-(

    Friday, June 5, 2015 5:10 PM