android,eclipse,samsung-mobileView the original page-Collection of common programming errors

UnKnown Error


  • Vincent
    android android-asynctask lifecycle 2013-11-30 7:51:11
    I have an activity in which I collect data for an online transaction. When the collection is done, I run a background thread (more specifically an AsyncTask) that calls a web-service and waits for its response, then return it to the activity. Meanwhile, a progress dialog shows up.I want the background process to be cancelled if the application finishes or user cancels (however, I still need to notify the web-service), and retained if the activity is destroyed due to a configuration change or to

  • con_9
    android 2013-11-30 3:06:29
    im trying to do something similar to this: android: how to listen to “sd card removed unexpectedly” but onReceive of the listener never gets called, when i dont have sdcard mounted or i remove the sdcard. Here is the code.public class MyClass1 extends Activity{BroadcastReceiver mSDCardStateChangeListener = null;/** Called when the activity is first created. */public void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);mSDCardStateChangeListener = MyClass2.regi

  • Ryan R
    android eclipse exception exception-handling 2013-11-30 2:55:39
    In my Application class I am trying to catch a force close before it happens, so I can log it and then rethrow it so the android can handle it. I do this since some users do not report force closes. I am developing in eclipse, and eclipse is not allowing me to rethrow the exception. It shows an error saying “Unhandled exception type Throwable: Surround with try/catch”. How can I rethrow the exception?public class MainApplication extends Application {@Overridepublic void onCreate(){super.onCreate

  • Peri Hartman
    android exception-handling logcat 2013-11-29 21:40:30
    UPDATE: Please see “accepted” solution belowWhen my app creates an unhandled exception, rather than simply terminating, I’d like to first give the user an opportunity to send a log file. I realize that doing more work after getting a random exception is risky but, hey, the worst is the app finishes crashing and the log file doesn’t get sent. This is turning out to be trickier than I expected 🙂 What works: (1) trapping the uncaught exception, (2) extracting log info and writing to a file.What

  • Unykvis
    android trigger.io 2013-11-29 12:39:40
    On Android 2.3.1, when you use the trigger.io code below, the trigger framework doesn’t scan the bar-code the first time when it is invoked. Actually the camera opens and the bar-code is scanned, however, after the scanning is complete you see the trigger splash page and the success function doesn’t get invoked. It starts working like it should when the scan function is called from the second time on-wards.forge.barcode.scan(function (value) {alert(“You scanned: “+value); });

  • jax
    android 2013-11-29 6:18:40
    My users are sending unhandled exceptions to me via http://code.google.com/p/android-remote-stacktrace/I am getting the following but have no idea what it means.java.lang.IndexOutOfBoundsException: getChars (7 … 0) has end before startat android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:935)at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:847)at android.text.TextUtils.getChars(TextUtils.java:69)at android.text.SpannableStringBuilder.<init&

  • totymedli
    android xml actionscript-3 flash 2013-11-29 2:32:20
    I try to make a simple XML gallery in android platform, but I get an error that says:Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.I’m sure that the file location is in the right place /mnt/sdcard/SketchCraft/MyDrawing 1.png.This is my XML:<?xml version=”1.0″ encoding=”utf-8″?><galleryPackage><image><imgURL>/mnt/sdcard/SketchCraft/MyDrawing 1.png</imgURL></image></galleryPackage>This is my actionscript:import flash.net.URLLoader;i

  • Andy Res
    android android-layout android-emulator android-widget android-ndk 2013-11-29 1:30:17
    I am building a Video Player client using the Android’s VideoView control. What I need is to have the ability to iterate through a list of songs forward and backward, by pressing the Next, Prev buttons. The idea should be the following: when clicking “Next”, 1) stop the currently playing video, 2) take the new Uri and assign to VideoView 3) call VideoView.start(); It should work properly, but it does not. Plus, I see the “media player went away with unhandled events” in the LogCat.Here’s how I

  • Toon Krijthe
    android actionscript-3 flash 2013-11-28 22:36:21
    This is the simplified version of my question.There aremovieclip1 movieClip2 movieClipadd TextA TextB Text C Text answerTouching movieclip1 should change TextA to 1 (the content should be 1) Touching movieclip2 should change TextC to 2 (the content should be 2)Touching movieclipadd should change TextB to + (the content should be +)Then automatical Textanswer should give the answer. that is 3(1+2=3)This is for mobile and I know to use ontouchbegin and ontouchend.

  • Shail Adi
    android 2013-11-28 20:14:31
    This question already has an answer here:write and read strings to/from internal file1 answerI’m trying to store some data which I received from my server into a file in my android project. But I’m not able to do that.. I used the following code which I’ve shown below.. Please help me out someone. Thanks.String FILENAME = “hello_file”; String string = “hello world!”;FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE); fos.write(string.getBytes()); fos.close();The error its givi

  • eQui
    eclipse ide suppress-warnings unchecked raw-types 2013-11-30 4:23:41
    I have a problem with the @SuppressWarnings annotation when handling raw-types warnings in Eclipse Helios.According to this post and the docs, the annotation parameter rawtypes should be used instead of the old unchecked in Eclipse Helios. However, when I use the rawtypes annotation, I get following warning:Unhandled warning token rawtypesEven when performing a quick-fix over a raw type, Eclipse suggests me to use rawtypes. However, I have found out that the old unchecked parameter still works i

  • Ryan R
    android eclipse exception exception-handling 2013-11-30 2:55:39
    In my Application class I am trying to catch a force close before it happens, so I can log it and then rethrow it so the android can handle it. I do this since some users do not report force closes. I am developing in eclipse, and eclipse is not allowing me to rethrow the exception. It shows an error saying “Unhandled exception type Throwable: Surround with try/catch”. How can I rethrow the exception?public class MainApplication extends Application {@Overridepublic void onCreate(){super.onCreate

  • Maroun Maroun
    java eclipse 2013-11-29 23:09:13
    Today I came to work, happy. But when I opened my Eclipse, I saw that one of my projects has errors.It’s weird because it shows that it has errors only in the window bar, and not in the Navigator. I don’t have any Java errors, this is a valid project that was fine all the time:Some of the errors on the error log of Eclipse:JavaBuilder handling ImageBuilderInternalException while building: SP_Procedure Cannot connect to VM File <SomeFile> has been skipped, problem while reading (‘Resource

  • Chucky
    java sql eclipse jdbc 2013-11-29 7:49:47
    I have a DBconnector class that I’ve written. Here is an instance of it using an insert query method it has. Ignore the query for now:ResultSet NewCustomer = db.executeInsert(“SELECT s Bookings VALUES (surnameOut,’Nilsen’, ‘Johan’, ‘Bakken 2’, ‘Stavanger’)”);At the moment the above line is getting a “Unhandled exception type SQLException” error. It suggests that I surround the above with a try/catch statement, or give the method that hold’s the code a throws exception. I was hoping there was som

  • Vadzim
    java android xml eclipse simple-framework 2013-11-28 19:50:21
    I am new to Java and Android development, so please keep this in mind. My goal is to deserialize data from xml files packaged into my application. I’m attempting to do this using Simple 2.4 but I get an “Unhandled Exception type exception” error in the code when using .read or .writeMy code looks something like this:import java.io.InputStream;import android.app.Activity; import android.os.Bundle; import android.view.View;import org.simpleframework.xml.Serializer; import org.simpleframework.xml

  • Sorceror
    eclipse eclipse-plugin safari webkit swt 2013-11-28 19:28:15
    My question is a bit like unexplored’s.My enviroment:OS: windows server 2008 r2 (x64) Safari installed 5.1.7 32 bit SWT (eclipse SDK 3.7.2 * 32) 32 bit jvm (32) Add -Dorg.eclipse.swt.browser.DefaultType=webkit in eclipse.ini Add C:\Program Files(x86)\Safari\Apple Application Support in windows PATHCode like this://create Mozilla browser browser = new Browser(parent, SWT.WEBKIT); //error was caused here.Error message:Unhandled event loop exception No more handles [Safari must be installed to use

  • user1321824
    eclipse eclipse-plugin 2013-11-28 16:42:29
    I added orb plug-in to Eclipse and created an IDL file.I configured IDL Compiler to the project which has IDL file.When i rigth-click on the IDL file there is an option as follows, CORBA->Compile CORBA Stubs but when i choose that option nothing was happened,so how to compile IDL file in eclipse and generate Java files.Please provide if there is any steps/procedures to follow to compile IDL file and generate java source filesThanks

  • Umair R
    eclipse opencv image-processing 2013-11-28 15:17:23
    I am running the example “Face Recognition in Videos with OpenCV” . When i run the example i get the error OpenCV Error: Image step is wrongI am having the similar problem as mentioned in this post except my images are .pgm Getting OpenCV Error “Image step is wrong” in Fisherfaces.train() method which leads me to OpenCV 2.0 C++ API using imshow: returns unhandled exception and “bad-flag” page,which mentions some changes in the linker settings for Visual c++ as: replace the us

  • Amir Amgad
    eclipse git aptana aptana3 2013-11-28 7:19:54
    I’m using Aptana 3.0.7 and whenever I try to commit changes to git repository, I receive this error:Unhandled event loop exception No more handles[MOZILLA_FIVE_HOME=’/usr/lib/xulrunner-addons’](java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: /home/amir/Desktop/Aptana Studio3.0.5/configuration/org.eclipse.osgi/bundles/226/1/.cp/libswt-mozilla-gtk-3659.so:libxpcom.so: cannot open shared object file: No such file or directoryno swt-mozilla-gtk in java.library.path/tmp/swtlib-32

  • DirkJan
    android eclipse eclipse-plugin adt r.java-file 2013-11-27 23:22:12
    After upgrading to Android ADT version 22 and cleaning my project, the R.java files went missing. I can’t use setViewContent(R.layout.activity_main) because the activity cannot reference to the xml layout (due to the missing R.java). Also, when using the (ctrl + space) to get suggestions for setContentView, the code is not typed in. Upon looking at the error log, it shows that there was an “Unhandled event loop exception”. The plug-in involved is the org.eclipse.ui.Also, whenever I create a new

  • David Roop
    android animation samsung-mobile 2013-11-16 7:58:48
    Im having a issue were my app keeps crashing on an animation I’m attempting to do. It works fine on my Razr version 4.1.2 but on the galaxy it crashes with a NumberFormatException it has version 2.3.6. Can anyone tell my why this is crashing? I am still trying to figure out if this is a sdk version issue. Also I tried to install my signed .apk on a samsung S3 and it wont even install. It just gives me a blank screen. This seems to only be an issue with Samsung phones.public class RSEanimation ex

  • 100rabh
    android instrumentation samsung-mobile android-windowmanager 2013-11-10 18:39:45
    I am running my Unit tests on various android devices using Instrumentation . Testcases works fine on emulator & all devices except Samsung Galaxy S. On Samsung Galaxy S it displays a Window Manager crash after injecting some 30 key events using instrumentation here is the complete crash log:D/dalvikvm(11862): GC_EXPLICIT freed 6800 objects / 374040 bytes in 54ms D/dalvikvm(11862): GC_EXPLICIT freed 780 objects / 71856 bytes in 39ms W/dalvikvm(11862): threadid=9: thread exiting with uncaught

  • kolufild
    android samsung-mobile 2013-11-8 6:32:37
    I wrote an Android app which runs without problems on every phone I tried except Samsung S3. What happens is that, while my app is running, other background processes (other apps, that is) will start dying. For example, after some time of using my app, Live Wallpaper will die, and user will get a black background on his phone after exiting my app. And finally, after some time of using it, my app is also killed by OS. What’s frustrating is that I cannot see any error message in log which would gi

  • D-Nice
    javascript android galaxy samsung-mobile 2013-11-6 20:15:16
    We have a signup page with in our app written in HTML in a WebView. We’re seeing a repeat of the following error come up all the time:window.onerror: Uncaught TypeError: Cannot use ‘in’ operator to search for ‘2’ in [email protected]’ve been able to infer that it happens almost strictly on the Spring Samsung Galaxy SIII. I’ve tested it on a Verizon SIII and didn’t have any problems. Once the error occurs, the user is stuck on the signup page and is unable to create an account. I’m lost as to what else I

  • David M
    web-applications phonegap bada samsung-mobile cordova 2013-8-23 20:36:39
    Has anyone been successful with the integration of Phonegap in Bada? I am using SDK 2.0.4 and have tried the project app available here (https://github.com/cordova/cordova-bada) but keep getting this error:TypeError: ‘undefined’ is not an object (evaluating ‘window.device.uuid’) at line 1 loaded from file I don’t understand why the Phonegap website indicates that Bada is supported…

  • scatmoi
    android webkit android-webview samsung-mobile omniture 2013-6-28 20:48:43
    Actually, a more accurate statement is:Every WebKit-based browser crashes on http://m.allrecipes.com/ but only in a Samsung Continuum SCH-i400 phone.I am trying to implement a WebView-based browser, mainly for learning purposes (there are way too many on the market, why add one?), and I was impressed by how quickly I could come up with a basic working one. I tested it on numerous sites on my Samsung Continuum phone and they all worked flawlessly, except for m.allrecipes.com .Whenever I tried to

  • Iftikar Urrhman Khan
    android sqlite samsung-mobile 2013-6-22 10:20:45
    We have one live application which uses SQLite to store application information. Now this application is running on all OS on all phones but one particular phone model Samsung Galaxy S2 GT-i9100. Code – At start of splash screen ( home screen ) We connect to database from SQLite. On every device it works like charm but only fails on above device. Below is stack trace when we debug on device. Tried to search on stackoverflow or internet but didn’t find any solution. Anyone knows if this is a know

  • beta
    android eclipse samsung-mobile 2013-6-18 23:59:47
    I started to look into Android programming today and created a very small app that is supposed to play MP3s. The tools I used where the Android SDK and eclipse. The code executed flawlessly in the Android emulator but after exporting it and attempting to install the apk on my Samsung Galaxy S2 I received a message telling me there was an error when parsing the file.Here is my phone’s configuration: Android v2.3.3, installation from unknown sources = allowed, USB-Debugging = enabled. The target s