Alright, I have been messing with this for a few hours now, and I can't figure out why I'm having issues.
I have been following the example from
http://xebee.xebia.in/2010/08/31/exploring-android-charting-and-graphs-solutions/
AND
I have already tried to create a fix using this link:
Android achartengine simple pie chart
AND
I have tried using the demo that achartengine provides Here.
But that project crashed immediately after selecting a chart type on my android device.
I am new to android, and have followed those two resources almost exactly, and I'm getting this:
Conversion to Dalvik format failed with error 1
None of my src files are showing up with errors, and I have added the new activity in AndroidManifest.xml and achartengine-1.0.0.jar into my libs folder
I am using Android 4.0.3 API Level 15
I can't believe I am having this much trouble with such a seemingly simple task, but I appreciate your help.
EDIT:
this is a snippit from my log:
07-04 17:03:58.650: E/AndroidRuntime(21611): FATAL EXCEPTION: main
07-04 17:03:58.650: E/AndroidRuntime(21611): java.lang.RuntimeException: Unable to start activity ComponentInfo{axiodesigns.com.caffeinezone2/axiodesigns.com.caffeinezone2.CzMain}: android.content.ActivityNotFoundException: Unable to find explicit activity class {axiodesigns.com.caffeinezone2/org.achartengine.GraphicalActivity}; have you declared this activity in your AndroidManifest.xml?
I have no activity called GraphicalActivity, and even after i added:
<activity android:name="GraphicalActivity"></activity>
I received the exact same error
quite a headscratcher
Found the fix, my build path was not recognizing that I had the .jar in my libs folder.
This fixed it:
The application AChartengine has stopped unexpectedly. Please try again
Thanks for the help all
Related
I developed applications which use native code. All of a sudden those are not working, giving error "Unsatisfied link error: Couldn't load native library from loader dalvik.System.pathClassLoader, findLibrary returned null. I restarted adt twice. Still getting the same error. Applications which are not using native code, are working fine.
The error implies that the program is not able to find the shared libraries that you would have created.
Which devices did you try it on ?
You can check once if they are available in libs directory of your app . [/data/data/app_id/lib ]. Also check if armv7 support is required and if the directory is there in the libs , is .so present there.
Now it's working. I deleted all my virtual devices and then created a new one. However it's showing "skipped 264 frames. application may be doing too much work on main thread" many times and whenever we press a button, displaying this message in log "error loading /system/media/audio/ui/Effect_Tick.ogg"
thanks.
I want to extract Text from image simply implement OCR(Optical Character Recognition) in Android using Library LEPTONICA and TESSERACT.I have succesfully added the open source library to my sample project But when i am running my application but on run time app force closes and error was .... ExceptioninInitialization UnspecifiedLink Error...Library Not found
Any suggetion how to resolve this error...I am stuck on this
I am tryng to use lambdaj 2.4 with dependencies in my android application. However when I try to use following select statement:
List<MOExpectedIncidentData> list = select(listExpectedIncidentData,
having(on(MOExpectedIncidentData.class).TRAVELWAY_ID,
equalTo(travelWayId)));
I get following exception:
java.lang.VerifyError: net.sf.cglib.core.ReflectUtils
Here is the stack trace:
[ch.lambdaj.proxy.ProxyUtil.createEnhancer(ProxyUtil.java:89),ch.lambdaj.proxy.ProxyUtil.createProxy(ProxyUtil.java:49),ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:68),ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:58),ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:50),ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39),ch.lambdaj.Lambda.on(Lambda.java:63),gov.mo.dot.timm.model.MODataManager.getAllIncidentCount(MODataManager.java:100),gov.mo.dot.timm.InterstateListActivity.handleDataParsed(InterstateListActivity.java:75),java.lang.reflect.Method.invokeNative(Native Method),java.lang.reflect.Method.invoke(Method.java:507),roboguice.event.eventListener.ObserverMethodListener.onEvent(ObserverMethodListener.java:32),roboguice.event.EventManager.fire(EventManager.java:130),gov.mo.dot.timm.model.MODataManager.getExpectedIncidentData(MODataManager.java:150),gov.mo.dot.timm.model.MODataManager.handleDataDownload(MODataManager.java:172),java.lang.reflect.Method.invokeNative(Native Method),java.lang.reflect.Method.invoke(Method.java:507),roboguice.event.eventListener.ObserverMethodListener.onEvent(ObserverMethodListener.java:32),roboguice.event.EventManager.fire(EventManager.java:130),gov.mo.dot.timm.tasks.DataDownloadTask.onSuccess(DataDownloadTask.java:70),gov.mo.dot.timm.tasks.DataDownloadTask.onSuccess(DataDownloadTask.java:29),roboguice.util.SafeAsyncTask$Task$2.call(SafeAsyncTask.java:210),roboguice.util.SafeAsyncTask$Task$6.run(SafeAsyncTask.java:275),android.os.Handler.handleCallback(Handler.java:587),android.os.Handler.dispatchMessage(Handler.java:92),android.os.Looper.loop(Looper.java:150),android.app.ActivityThread.main(ActivityThread.java:4263),java.lang.reflect.Method.invokeNative(Native Method),java.lang.reflect.Method.invoke(Method.java:507),com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839),com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597),dalvik.system.NativeStart.main(Native Method)]
Any idea on this will be very very helpful. I have already spent so much time to resolve this.
Thanks
Apurva
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 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