I'm a English learner,and now I'm using WordNet to make a dictionary APP and you know RiTa is a framework for Wordnet, on the homepage http://rednoise.org/rita/index.html it's saying "now with one API for Java, JavaScript, Node, & Android", I download the jar file rita-1.0.90.jar from http://rednoise.org/rita/download/index.html and test it in Android Studio, and it's not working,the I look up in the source code in rita.wordnet.jwnl.dictionary.file_manager.FileManager.java and find something like java.rmi.Remote and so on,we all know Android does not support java.rmi.Remote. so I'm wondering RiTa really supports Android? if so, where to download? was I downloaded from the wrong page?
Any reply or comments are appreciated
My logcat in Eclipse is like this:
06-14 02:15:44.960: I/dalvikvm(2081): Failed resolving Lrita/wordnet/jwnl/dictionary/file_manager/FileManager; interface 1431 'Ljava/rmi/Remote;'
06-14 02:15:44.960: W/dalvikvm(2081): Link of class 'Lrita/wordnet/jwnl/dictionary/file_manager/FileManager;' failed
06-14 02:15:44.970: I/dalvikvm(2081): Failed resolving Lrita/wordnet/jwnl/dictionary/file_manager/FileManager; interface 1431 'Ljava/rmi/Remote;'
06-14 02:15:44.970: W/dalvikvm(2081): Link of class 'Lrita/wordnet/jwnl/dictionary/file_manager/FileManager;' failed
06-14 02:15:44.970: W/dalvikvm(2081): VFY: unable to find class referenced in signature (Lrita/wordnet/jwnl/dictionary/file_manager/FileManager;)
...... They are all like these
Android does not permit the attempt to load java.* classes other than those that ship with the OS unless passed a special flag to dx.
But it should be possible to pack all rmi classes into a jar file as discussed here.
You were downloading from the right page. FYI this is the link to the latest RiTa.jar and also a quickstart tutorial for using RiTa in Android studio.
Related
I updated my Phonegap (Cordova) project from 1.9 to 2.0 and am receiving the following two new errors:
Web Console
JSCallback Error: Request failed. at file file://android_assets/www/js/cordova-2.0.0.js:3698
and
dalvikvm
Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generatedWebResourceResponse
Is this a known problem? I have searched but can't find a solution that addresses these issues. I have tried creating a new blank project and I am getting the same errors. I have also ensured Eclipse and the SDK manager are up to date.
Any help would be much appreciated.
Thank you.
Not sure about the first question as I need to know what you are doing when that log appears.
Regarding the second question:
https://stackoverflow.com/a/12043959/41679
I'm trying to run Echo example on Android's Emulator:
- The server is running well on my computer (windows 7)
- In OnCreate method of the AndroidWithNettyActivity(the class is created when I create Android project) I created new instance of AndroidEchoClient and invoke the run method.
When the Emulator start my activy (AndroidWithNettyActivity) it fails and show me dialog to force close.
Does anyone have experience about this problem?
In the log cat, there is error: [05-20 07:21:13.444: E/dalvikvm(325): Could not find class 'org.jboss.netty.bootstrap.ClientBootstrap', referenced from method Archer.Netty.Android.AndroidEchoClient.run]
It seems that the Emulator cannot find the ClientBootstrap class of netty's library (netty-3.4.5.Final.jar), but I don't know why because I already added netty's library in build path of my project.
Please help me, thank in advance :)
That's my stupid mistake, I'm just resolved this issue by exporting the netty's library with my adroid app
I'm unable to run even the default App Engine connected Android app, since updating my SDK. I've gone as far as deleting eclipse and all of my libraries and reinstalling them with no success. I've followed Google's tutorial to the letter and verified the validation tool is in my build path. This is the error I'm getting (and yes requestfactory-client.jar is in my library).
dalvikvm(375): Could not find method com.google.web.bindery.requestfactory.vm.RequestFactorySource.create, referenced from method com.Util.getRequestFactory
dalvikvm(375): VFY: unable to resolve static method 84: Lcom/google/web/bindery/requestfactory/vm/RequestFactorySource;.create (Ljava/lang/Class;)Lcom/google/web/bindery/requestfactory/shared/RequestFactory;
I'm completely lost at this point and about to pull some hair out, please help. Thanks
In my case it's an issue with the new ADT 17 and how it handles library projects. This post is a good explanation on how to fix it:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
I, too, was going crazy on this. Hope this helps.
The validation step can be important too (like you did):
http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation
I am trying to use the EWS Java API v1.1.5 (http://archive.msdn.microsoft.com/ewsjavaapi) in an Android application, and have run into a number of issues.
I downloaded the source, and followed the instructions provided to compile the EWS Java API in Eclipse. In those instructions you are told to download and
add the following pre-requiste jar file dependencies:
commons-codec-1.4.jar
commons-httpclient-3.1.jar
commons-logging-1.1.1.jar
jcifs-1.3.15.jar
I did this, and followed the build instructions with produced the following jar files:
EWSAPI-1.1.0.jar
EWSAPIWithJars-1.1.0
Next, I built a brand new Android application, added the appropriate permissions to the manifest, and then added the following source to the primary activity's OnCreate:
ExchangeService service = new ExchangeService();
ExchangeCredentials credentials = new WebCredentials("emailaddress", "password");
service.setCredentials(credentials);
try
{
service.autodiscoverUrl("emailaddress", this);
}
catch (Exception e)
{
e.printStackTrace();
}
I first tried running this application with the EWSAPI-1.1.0.jar file as a dependency. When I did that, I obtained the following fatal error:
Uncaught handler: thread main exiting due to uncaught exception
java.lang.NoClassDefFoundError:
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager at
microsoft.exchange.webservices.data.ExchangeServiceBase.(Unknown
Source) at
microsoft.exchange.webservices.data.ExchangeServiceBase.(Unknown
Source) at
microsoft.exchange.webservices.data.ExchangeService.(Unknown
Source) at
com.meshin.exchange.ExchangeDiscoveryActivity.onCreate(ExchangeDiscoveryActivity.java:40)
From what I've researched, it seems like this error is being generated because Android comes with the Apache HttpClient 4.0, which doesn't appear
to have the MultiThreadedHttpConnectionManager class anymore.
If I instead remove the EWSAPI-1.1.0.jar, and instead use the EWSAPIWithJARS-1.1.0.jar file as a dependency, I get the following error:
VFY: unable to resolve static method 908: Ljavax/xml/stream/XMLOutputFactory;
newInstance()Ljavax/xml/stream/XMLOutputFactory;
VFY: dead code 0x0008-006a in L
microsoft/exchange/webservices/data/EwsUtilities;.formatLogMessage
(Ljava/lang/String;Ljava/lang/String;) Ljava/lang/String;
VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamWriter;)
And then eventually...
FATAL EXCEPTION: main java.lang.VerifyError:
microsoft.exchange.webservices.data.AutodiscoverService at
microsoft.exchange.webservices.data.ExchangeService.getAutodiscoverUrl(Unknown
Source) at
microsoft.exchange.webservices.data.ExchangeService.autodiscoverUrl(Unknown
Source) at
com.meshin.exchange.ExchangeDiscoveryActivity.onCreate(ExchangeDiscoveryActivity.java:41)
I am assuming because now I am including the HttpClient 3.1 jar and it is conflicting with the HttpClient 4.0 jar included with the Android libraries.
My question is if there is a way for me to use the EWS Java API in an Android project without having to re-write the parts of it which reference
HttpClient 3.1-specific things which are no longer in 4.0.
You can use microsoft's EWS api for android by doing the following steps,
download the source code available in the URL,
http://archive.msdn.microsoft.com/ewsjavaapi
EWSJavaAPI_1.1.5.zip
Make the changes to above api to work for JDK 1.4 in eclipse like remove override annotations e.t.c
Download source code of javax.* package available in below URL,
http://www.java2s.com/Code/JarDownload/jsr173/jsr173_1.0_src.jar.zip
Download source code of stax api available in below URL,
http://dist.codehaus.org/stax/distributions/stax-src-1.2.0.zip
Keep all the sources under the single java project in eclipse
Open the project explorer and select the package which are starts with "javax" and rename to your company name eg: com. Note: Eclipse will ask for all the naming contexts will change then click OK.
Export all the java sources to one single jar file.
Then You good to go to use the jar in Android application with out any problems.
I used the same way explained above and it worked in android application 100% perfectly.
This isn't a useful answer but I've also been struggling to look at the EWS API over the last couple of weeks, with no success.
The main issue I've found is it references a lot of the javax APIs which aren't on Android. There's a hack you can find that explains how to "re-class" these but I've not got it working yet; in addition, the DnsClient references some namespaces that jarsearches only return for rt.jar - the main runtime. And including this in an Android app would just be crazy!
Before finding the API I was trying to use KSOAP to communicate with EWS but again ran into problems - you need to be able to do NTLM and SSL and I couldn't find any way of combining all these with KSOAP in any simple way.
The EWS API looks the way to go (why re-invent the wheel) but getting it working on Android looks very tricky (if not impossible)
Please check this library for the solution
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