I am trying to bind JNA-3.0.9 jar to binding library as EmbeddedReferenceJar as it is required by one of the other JARs i am using.
I am facing the error binding a jna-3.0.9 jar file. The error message is :
Error CS0121 The call is ambiguous between the following methods or properties: 'IFromNativeConverter.NativeType()' and 'IToNativeConverter.NativeType()' EDCBinding1 ****\obj\Debug\generated\src\Com.Sun.Jna.ITypeConverter.cs 108 Active
Is it really required to bind JNA jar seperately? or is it already part of Microsoft OpenJDK?
Any help is much appreciated.
Related
Well, I'm working on a library/SDK that has activities/fragments and I want to use data binding instead of the findViewById() method.
But i got this error message when I enabled dataBinding-> enabled = true in library gradle module but not enabled in the app:gradle module.
This is the error I got:
Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
Didn't find class "androidx.databinding.DataBinderMapperImpl" on path: DexPathList[[zip file "/data/app/io.raychat.raychat_sdk-eNdusNjUCa3sHWzKRK-iqw==/base.apk"],nativeLibraryDirectories=[/data/app/io.raychat.raychat_sdk-eNdusNjUCa3sHWzKRK-iqw==/lib/x86, /system/lib, /system/vendor/lib]]
The user of this library is different and I can't tell all of them to enable data binding in app:gradle module. what should I do?
As of Data Binding Library - Get Started
You must configure data binding for app modules that depend on libraries that use data binding, even if the app module doesn't directly use data binding.
So when you develop a library and you can not force your library clients to enable data binding, you simply should not use it.
Have you considered using View Binding instead?
I have a multi module android project. With core and main as modules.
I am using data binding on both the modules. But whenever I try to enable testCoverage on core module project build fails with error
java.lang.RuntimeException: Found data binding errors.
Cannot find the setter for attribute 'app:marginStart' with parameter type int on android.widget.LinearLayout.
file:///Users/abhimanyushegokar/droid/myproject/build/intermediates/exploded-aar/droid/core/unspecified/proj/res/layout/my.xml Line:25
Any help regarding this would be appreciated.
I'm having an issue with IntelliJ's dependency handling in regards to external modules. Here's some context:
I'm writing an Android app which implements Google Maps. For my current feature set, I require two external libraries-- Google's Play Services Library and mapex (A third party google map extension library located here https://code.google.com/p/mapex/). I actually built most of this project in Android Studio before I was recommended to move to IntelliJ due to the easier dependency handling. But now I'm here and still having problems.
My Error
When trying to build an object from a class located in the mapex package (com.androidnatic.maps), I get this error when starting the activity the view is contained in (object has not been created yet):
07-03 11:40:35.837: ERROR/dalvikvm(3585): Could not find class 'com.androidnatic.maps.SimpleMapView', referenced from method com.example.myproject.MapActivity.showHeatMap
And then, upon creation, my app force closes and leaves this behind in logcat:
7-03 11:40:45.467: ERROR/AndroidRuntime(3585): FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.androidnatic.maps.SimpleMapView
at com.example.myproject.MapActivity.showHeatMap(MapActivity.java:492)
Yet I'm completely stumped because my IDE gives me no sign that anything is wrong! Classes are auto-filled in when trying to access them from MyProject.
ide-fill-in http://www.tonyandrys.com/img/fillin.jpg
No build errors about missing classes, missing modules, class definitions, or anything related.
I get the same results if I try to access the class via its full package name as well.
// No dice.
final SimpleMapView mapView = new SimpleMapView(this, "apikey");
final com.androidnatic.maps.SimpleMapView mapView = new com.androidnatic.maps.SimpleMapView(this, "apikey");
It seems that there's only an issue when the application is running on my phone, as far as my IDE is concerned.
Here's the structure of MyProject:
main-project-structure http://www.tonyandrys.com/img/mainstructure.jpg
Here's my main project's dependency settings (where I assume I screwed up somewhere):
project-structure http://www.tonyandrys.com/img/projectstructure.jpg
And here is the structure of the mapex library module:
mapex-lib http://www.tonyandrys.com/img/mapexstructure.jpg
The class files that I'm trying to access live in MapExLib/gen and MapExLib/src, which are currently marked as source directories (blue).
Does anyone have any ideas on how to proceed from here?
Try to do this :
Android, IntelliJ Idea, changing module type
I had the same error "Could not find class XXX from referenced method XXX" with Intellij, involving an Android Test Module and a test which could not find the Activity class anywhere.
I set inside the Project Structure the main Module's Facet Android to Library Module (checkbox) and it worked...
Let us know
I'm trying to use the Ektorp CouchDB library in an Android app and I always get this exception:
java.lang.NoClassDefFoundError: org.ektorp.impl.docref.DocumentReferenceSerializerProvider
Here is my code:
HttpClient authenticatedHttpClient = new StdHttpClient.Builder().host("myhostname").port(5984).username("username").password("password").build();
CouchDbInstance dbInstance = new StdCouchDbInstance(authenticatedHttpClient);
CouchDbConnector db = dbInstance.createConnector("luscinia", true);
The exception always occurs on the last line of the above code.
I followed the erktop wiki about dependencies here: http://code.google.com/p/ektorp/wiki/dependencies
Which results in my project containing:
commons-io-2.0.1.jar
httpclient-4.1.1.jar
jackson-core-asl-1.8.1.jar
jackson-mapper-asl-1.8.1.jar
org.ektorp-1.1.1.jar
slf4j-api-1.6.1.jar
slf4j-simple-1.6.1.jar ( slf4j fails without it)
LogCat gives me a warning and an error lines before the exception, maybe they can help:
Link of class 'Lorg/ektorp/impl/docref/DocumentReferenceSerializerProvider;' failed
Could not find class 'org.ektorp.impl.docref.DocumentReferenceSerializerProvider', referenced from method org.ektorp.impl.StdObjectMapperFactory.createObjectMapper
I don't understand what they mean.
Any idea ?
I'm afraid that Ektorp 1.1.1 is not compatible with Jackson 1.8.
This will be fixed in the 1.2.0 release due this summer. Use Jackson 1.7.7 in the mean time.
I'm not an expert java coder but I imagine the java object its extending before the exception is not part of the java implementation running on android. Dalvik is not a standard jvm.
I'd recommend this https://github.com/couchone/libcouch-android library for couch on android.
i have class used with android frameworks, it calls icu4j's Arabicshaping. now i'v merged this class with another android branch that uses icu4c ( c implementation). but build process gives me error saying cannot find Arabicshaping...
searching in icu4c files shows me that it has both ArabicShaping.c and ushape.c
but i don't know how to call them from framewoks java code .
any idea? thanks