Android application used to run in Eclipse but now, it doesn't - java

My application was running perfectly fine. I closed Eclipse for few days and now that I want to run it, the emulator starts but the application doesn't run. It prompt this error saying:
The application Pico TTS (process com.svox..pico) has stopped unexpectedly. Please try again.
Apparently it is because of my TextToSpeech, but what about it? There's no error shown in the application.
In my Log Cat I receive such messages:
at dalvik.system.nativestart.main(native method)
at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:433)
at com.kelamrsan.MPActivity.onCreate(MPActivity.java:47)
Cheers.

Related

android.system.ErrnoException: read failed: EAGAIN in Android 5.0

When I tested my app on Android 8.0 it's work just fine, but when I test it on Android 5.0 it keeps crashing every time I launch a new activity or I click in items of navigation drawer, I get the exception below, can you please help me, I am not getting anything from crash log telling where my application is crashing
02-18 11:16:28.934 800-1189/? E/NativeCrashListener: Exception dealing with report
android.system.ErrnoException: read failed: EAGAIN (Try again)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:147)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
at android.system.Os.read(Os.java:364)
at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)
Problem solved by removing this code from xml:
android:shadowColor="#color/text_shadow_white"
android:shadowDx="-2"
android:shadowDy="-2"
android:shadowRadius="1"

Error in launching jnlp

While launching JNLP file, I am getting following error.
Could not create java virtual machine. A fatal exception has occurred.
Program will exit.
This problem sometimes goes away after restarting. Any quick-fix for this error ?

java.lang.NullPointerException when creating first android app in OS X 10.9.4

I just download Eclipse JUNO IDE for Android Developers v. 23.0.2.1259578
I am using as a jre:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
but i can't get rid of this error when i build my first android app.
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'HelloWorld'.
java.lang.NullPointerException
I am following this tutorial, but i can't even reach the last step (the problem occurs when i click the Finish button) : http://developer.android.com/training/basics/firstapp/creating-project.html
Here the see workspace/.metadata/.log :
!MESSAGE Errors running builder 'Android Resource Manager' on project 'HelloWorld'.
!STACK 0
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.abortOnBadSetup(BaseBuilder.java:327)
at com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.build(ResourceManagerBuilder.java:92)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Solved !
Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
The newer versions of Android require JDK 1.7. I would try using that.
I run into such problem recently too. When i create a new Activity, i click the finish or next button in the final step, but nothing happens. When i create a new project that error message pop up every time. Then i recalled that i installed SVN on Eclipse about two month ago. So i uninstalled SVN yesterday, everything works out fine now!!! So i think maybe some plugins you installed on your eclipse prevent Android Resource Manager form working properly.
So i suggest you uninstall your plugins and find out whether some of them is wrong.
Hope this would help!

Error occurred during initialization of VM (java.lang.StackOverflowError) in Android

Today I suddenly started encountering
Error occurred during initialization of VMjava/lang/NoClassDefFoundError: java/lang/ref/FinalReference
in Eclipse Indigo. I followed here and also I tried here and
now I am getting:
Error occurred during initialization of VM java.lang.StackOverflowError
I am building an Android application using Eclipse Java EE IDE.
EDIT: I don't know why it caused the problem but now I am able to run my activity by going through run-run configurations-android application-run.
Problem persist due to JVM. If you will give command like java -version. It gives same problem.
If you want to start eclipse.exe by means of the following :
E:\softwaredownload\eclipse-jee-helios-SR2-win32\eclipse>eclipse -vm "c:\Program Files\Java\jdk1.7.0_03\jre\bin\javaw.exe

Running Java app from inside emacs using JDEE throws NoClassDefFoundError

I have configured JDEE in emacs. But when I try to run any App, it throws NoClassDefFoundError .
Upon compilation, although a class file is created, it only shows the buffer for sometime and then closes it.
The same files if compiled and run from the terminal work perfectly fine.
Also, on this machine I have java-6-openjdk installed. I had configured JDEE on my home computer which has sun java jdk and there are no such problems there.
Other than this, features such as code completion, generation etc work fine.
How do I solve this? Is this due to open jdk ?
I am using a Ubuntu 10.04 desktop.
This is the stack trace
cd /home/vineet/java/KodeJava/src/org/kodeplay/kodejava/
/usr/lib/jvm/java-6-openjdk/bin/java org.kodeplay.kodejava.EmacsTest
Exception in thread "main" java.lang.NoClassDefFoundError: org/kodeplay/kodejava/EmacsTest
Caused by: java.lang.ClassNotFoundException: org.kodeplay.kodejava.EmacsTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.kodeplay.kodejava.EmacsTest. Program will exit.
Process org.kodeplay.kodejava.EmacsTest exited abnormally with code 1
Thanks
something in your config is wrong. you are trying to run from the "/home/vineet/java/KodeJava/src/org/kodeplay/kodejava/" directory, but in order to find your class on the classpath, you should be running from "/home/vineet/java/KodeJava/src/". Probably need to configure the "jde-run-working-directory" variable.
From the question, it sounds as if the JDEE configuration is not complete when it comes to setting up the command to be launched when running the Java App.
If the same Java App can be run from the terminal with no issues, OpenJDK is not causing the trouble, I'd wager.
Perhaps you copied over from the other computer the JDEE configurations and did not adopt them for the new computer that has OpenJDK.

Categories

Resources