trouble importing android-remote-stacktrace - android

I am trying to get a remote stacktrace on a crash, and so I'm trying to use android-remote-stacktrace. In eclipse, I imported it and added it to my build path, but I am getting this error:
07-09 20:54:32.983: E/AndroidRuntime(1814): java.lang.NoClassDefFoundError: com.nullwire.trace.ExceptionHandler
This is odd, because I see trace.jar in my "Reference Libraries" and I see this class in there which you can see in this screenshot of my Eclipse window.
Is there something I am missing? Here is the code calling this class, I'm linking to github so that you can see that this is used in a Service. Is it because "this" refers to a service rather than an Activity?

You can create folder libs inside your project folder (if there is no one). Put your trace.jar in libs.

Related

Package Rename Issue FBReader

While renaming the package in android eclipse, I am getting an error W/System.err(10980): java.lang.NoClassDefFoundError: org/geometerplus/fbreader/formats/PluginCollection and such errors, I renamed the package in manifest.xml by using refactor->rename. Can anybody tell me what is the issue.
Please mention how you did that.BTW here is rough idea: right click on project select android tools and from there select rename package options.
There are few reasons why this may occur. Class files are bytecode that Java interprets to execute your program. The following must be checked to ensure proper functioning of the application.
Class file located, Exception raised while initializing static blocks.
ClassNotFoundException -- .class not found for that referenced class irrespective of whether it is available at compile time or not(i.e base/child class).
Class file located, but Exception raised while initializing static variables
The error indicates, that something was found at compiletime but not at runtime, maybe you just have to add it to the classpath.
Right click on your project and select -> Compile Module, and then re-start the project and it should work again.
In eclipse make sure you have the shapes, linepoints and the spaceobjects as entries in the .classpath file.

Android: R cannot be resolved after adding a new class

I get the following error in eclipse: r cannot be resolved. However that appeared just after I added my own library as a resource to my project. It seems that eclipse cannot resolve which R to use, the library one or the project one. Note also that the library is marked with the is library check box in the project set-up. Also whenever I remove my library from the reference list eclipse does not show any errors, but upon compiling logCat shows a Class Not Found exception. How do I fix this issue?
Thanks
R is an autogenerated class. If you clean the project, the error should dissapear.
R.java is not getting generated for your project which is done automatically, pls check whether something wrong with any XML file or check console if there is any problem in XML it will show you something related to XML or check something wrong with importing packages. If its not about any XML errors then check on importing that library project in your project. you may get some imports related to something like this: com.android.R then remove this if you see this and then manage imports again.

Unable to instantiate service com.bump.api.BumpAPI: java.lang.ClassNotFoundException: com.bump.api.BumpAPI

I am trying to run the sample app for the Bump API 3.0, when I try to run the application on the emulator i get the following error:
E/AndroidRuntime(742): java.lang.RuntimeException:
Unable to instantiate service com.bump.api.BumpAPI:
java.lang.ClassNotFoundException: com.bump.api.BumpAPI
I tried to follow the API instructions (I'm rather fresh as far as android/java/any programing goes), i added the attached .jar file to the project (build path-> add JARs), and i see the missing class inside it in the "refrences libraries" list. There's also a .so file attached, this one i only placed in "libs" folder as i'm not sure how to link it to the project besides that.
I would appreciate any help on resolving this,
Thanks a lot,
Geva Tal.
EDIT: Solved after creating a new AVD...still don't know what went wrong.
It sounds like everything should be working fine... I suggest cleaning your project, restarting eclipse, and perhaps creating a new AVD.
https://groups.google.com/forum/?fromgroups#!topic/bump-api-android/WMGHaRqoWQA
Here's the answer. Include .so into the libs folder of your project. Their instructions page is missing this.

YoutubeService class error in android

I got this error
E/AndroidRuntime(475): java.lang.NoClassDefFoundError: com.google.gdata.client.youtube.YouTubeService
When I try to run Youtube data api. I have almost included all the api's, instead extra jar files but still it is giving me this error! Please give quick reply how to fix it?
If you had updated your ADT to ADT 17 then you need not to add reference of external jar, just put that jar in a folder named "libs".

Unable to reference a Library project - Android

Well, I wanted to create a Library project from my existing sources so that it would help me re-use code for the paid app that I have in mind. When I saw the developer guide on how this was to be done, I thought it was very simple.
Just mark the project as a Library project and it should be converted to one.
But when I tried referencing one of the base classes in an application, the app force closes with the following exceptions
02-04 21:50:06.765: E/AndroidRuntime(699): java.lang.NoClassDefFoundError: in.my.package.name.R$layout
Let me give you some more info. I have referenced the Library project in the application and have also included the manifest entries with fully qualified activity names. I have a BaseActivity which has all the menu and re-usable code bits. The point where the above exception occurs is where I am trying to reference the layout file in this BaseActivity inside the library project.
setContentView(R.layout.apphome);
What is it that I am missing or doing wrongly?
PS: I am just noticing that When I right click on my application and go to the android tab, there is a red cross instead of a green tick in the place where the library project is referenced. But there are no visible errors on the console or in the code of the project.
Seems its a known issue.
Issue link here
Hope Google guys resolve this problem in their next SDK release.
So to be clear, the problem was that my libraries had custom styling capabilities and that was the problem.

Categories

Resources