Android class not found NoClassDefFoundError - java

I need your help to resolve a class problem. When I run my virtual device, and when I click on button to call a method, that doesn't work.
I tryed with different libraries like itext and justformPDF (last one is java libraries).
I indicated it in build path but I have a mistake ... The class is not found :(
Thanks for your help :)
You can see the logcat here : www.aclebpokerclub.com/Application/LogCat.png

Related

Can't draw a overlap2d scene

I'm starting with libGDX and overlap2d, I'm following this tutorial: Runtime Quick Start - Overlap2D setup tutorial. I did everything like the video shows, but when I try to run it, some red lines appear. I don't have any idea about what I could do to solve. Can any one help me?
Here's my console:
Here's my Main class:
Hers my GameStage class:
project.dt:
{"pixelToWorld":3,"originalResolution":{"name":"orig","width":1920,"height":1200},"scenes":[{"sceneName":"MainScene","physicsPropertiesVO":{}}]}
MainScene.dt:
{"sceneName":"MainScene","composite":{"sImages":[{"uniqueId":3,"tags":[],"x":-7.666664,"y":-13,"originX":85.333336,"originY":85.333336,"layerName":"Default","imageName":"chao"},{"uniqueId":4,"tags":[],"x":159.33334,"y":-10.333336,"originX":85.333336,"originY":85.333336,"zIndex":1,"layerName":"Default","imageName":"chao"},{"uniqueId":5,"tags":[],"x":-7.3333282,"y":157.66666,"originX":85.333336,"originY":85.333336,"zIndex":2,"layerName":"Default","imageName":"chao"},{"uniqueId":6,"tags":[],"x":159.33333,"y":158.66667,"originX":85.333336,"originY":85.333336,"zIndex":3,"layerName":"Default","imageName":"chao"}],"layers":[{"layerName":"Default","isVisible":true}]},"lightSystemEnabled":true,"ambientColor":[0,0,0,1],"physicsPropertiesVO":{}}
Does anyone have any idea how can I solve it?
Thank you
The thing is that method loadScene(MainScene.dt) is looking for a pixelToWorld field but there is no pixelToWorld in your MainScene.dt file.
Possible reason may be Overlap2d Editor and overlap2d-runtime version incompatibility.

Eclipse not finding a main method

Firstly, I know that similar questions have been asked and answered before, however none of the solutions worked in my case.
For some reason, eclipse keeps showing a launch error saying that no main method is found despite there being a public static void main(String[] args) in my main class. Could there be an issue in the class path? I'm really unsure whats causing it.
Try putting your java files under the "src" folder. Apparently they are all out of that folder and that could be the cause.
Go to Run->Run Configurations, select your project. In the Main tab, for Main class, give class name along with complete path of the class containing main function. This worked for me :)
Try to say at the beginning of the code:
package yourpackage; //<----------your package is the name of the
package you are in
The class havent automatically put the package comment at the beginning of the Code
because like the other say your structure is false.
Yours:
project -----> classes,src
Should be:
project ---->src ---->package----> class
I got the same error but with different reason. I changed my java build path libraries to 15.0.1 and tried to run and it failed after that I changed them back to 11.0.2 and it worked.

R cannot be resolved to a variable, usual fix doesn't seem to work

I am trying to compile my android app that I am crating by following the google tutorial at https://developer.android.com/training/index.html
I have run into a problem where I get the error "R cannot be resolved to a variable"
I followed the suggestions from the other threads such as cleaning/rebuiding, removing all import android.R, and reinstalling my Android SDK Build-tools for every version
Here is a copy of the tutorial project with the issue MyFirstApp.zip
I have taken the suggestions found in other threads, but their solutions have been unsuccessful.1 2 3 4 Please help!
Please let me know if there is any other information you need to fix this issue.
I have seen your code there is an error inside main_activity_actions.xml which is inside your menu folder
It does not find #string/action_search which must be present in strings.xml
So put <string name="action_search">Search here</string> inside your strings.xml
and clean and build the project.
I hope the error will be solved.
It usually append when you have an error with your XML file.
Maybe you try to use an XML variable who doesn't exist anymore. It will not give you any error on your XML.
Verify your XML variable on your file 'Value' and which you call from your Java file

Android: Implementing SlidingMenu and ABS

I am trying to implement the SlidingMenu from https://github.com/jfeinstein10/SlidingMenu together with http://actionbarsherlock.com/ and I came across a problem that I could not fix myself that's why I turned to the issues page on SlidingMenu's GitHub. But 2 days and I got no reply so I am gonna ask it here.
Basically on the example project provided by jfeinstein10, I copied the SampleListFragment.java file and I've named it MenuListFragment.java on my project. I've made a couple of changes but those should not be an issue.
I also copied the menu.xml from the layout directory but changed its name attribute to the previous file including the package.
Project builds properly and no errors are encountered. Time to run the project.
Now on my project's main activity, when I call the setMenu(R.layout.menu); statement during runtime, it gives me an error which tells me something about ClassCastException (cannot cast com.dokgu.dota2stats.MenuListFragment to android.app.Fragment).
I've tried a couple of things like change the MenuListFragment.java to extend the android.app.Fragment instead of ListFragment but it didn't solve the problem and more issues came up because of that.
So please, can anyone help me with this please? I really want to make this work.
You can find the issue here as well: https://github.com/jfeinstein10/SlidingMenu/issues/546
Actionbarsherlork supports the lower lever version since android 2.x while the slidingmenu needs android 3.0+.Maybe you can add the android-support-v4.jar ,with some fragment and activity in slidingmenu project extending to.

java.lang.NoClassDefFoundError on android

i am doing an application-email sending without user interaction. so that i got coding from the following link. here i got java.lang.NoClassDefFoundError: com.murali.email.GMailSender. i got this error at
GMailSender sender = new GMailSender("username#gmail.com", "password");
sender.sendMail("This is Subject",
"This is Body",
"user#gmail.com",
"user#yahoo.com");
in the MailSenderActivity Class. i added all external jars in referenced library and no error found at compile time. i spent more time to solve the issue but failed. i know it is possible of duplicate question but the other answers were not used for me. i guess me or eclipse miss some jar or class path for GMailSender class. please help me. i do not know how to solve it.
Make sure the jar sits in a folder named libs, not lib. Then perform "clean" and make sure the jar appears under Android dependencies.
If we get this error on android
java.lang.NoClassDefFoundError: javax.activation.DataHandler referenced from method javax.mail.internet.MimeMessage.updateHeaders
We need to add aditional.jar along with mail.jar and activation.jar. This solved my issue in android when accessing MimeMultipart.

Categories

Resources