Emulator always says "Unfortunately, (Name of the sketch) has stopped."

Hello! I am really new to programming. Running a Win10 64bit. Downloaded Processing (works fine), klicked Android Mode+downloaded it, downloaded Emulator.

So far so good. but if i want to run a sketch on emulator that Error appears. Not in Emulator nor on device its possible to get a example sketch running. What could i try to fix that?!?!?

Answers

  • I will suggest running your first sketch in an actual device. After you get the Android mode setup properly, then you can try the emulator. Have you run applications before in Android mode? You can try the following reference: http://android.processing.org/tutorials/android_studio/index.html

    Kf

  • Hello kfrajer, tx for your answer! I just wanted to write some sketches, android studio was too hard for me at this point of time. just wanted to get some fast results at the beginning.

    i have a Note 3 with Android 5.0 -->Downloaded the 5.0 Stuff in the SDK Manager -->Activatet USB Debugging in Device

    Click "run on device" --> Lost connection with device while installing. Try again. debug: Failure [INSTALL_FAILED_DEXOPT] Shutting down any existing adb server...

    what to do?!?!?! help! :(

  • Shown Problems while compiling: -compile:

    [javac] Compiling 4 source files to C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\bin\classes

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 4) import processing.data.*; ^^^^^^^^^^^^^^^

    The import processing.data is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 5) import processing.event.*; ^^^^^^^^^^^^^^^^

    The import processing.event is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 6) import processing.opengl.*; ^^^^^^^^^^^^^^^^^

    The import processing.opengl is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 8) import java.util.HashMap; ^^^^^^^^^^^^^^^^^

    The import java.util.HashMap is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 9) import java.util.ArrayList; ^^^^^^^^^^^^^^^^^^^

    The import java.util.ArrayList is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 10) import java.io.File; ^^^^^^^^^^^^

    The import java.io.File is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 11) import java.io.BufferedReader; ^^^^^^^^^^^^^^^^^^^^^^

    The import java.io.BufferedReader is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 12) import java.io.PrintWriter; ^^^^^^^^^^^^^^^^^^^

    The import java.io.PrintWriter is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 13) import java.io.InputStream; ^^^^^^^^^^^^^^^^^^^

    The import java.io.InputStream is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 14) import java.io.OutputStream; ^^^^^^^^^^^^^^^^^^^^

    The import java.io.OutputStream is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\Array.java (at line 15) import java.io.IOException; ^^^^^^^^^^^^^^^^^^^

    The import java.io.IOException is never used


    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 9) import android.content.pm.PackageManager; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    The import android.content.pm.PackageManager is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 11) import android.support.v4.content.ContextCompat; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    The import android.support.v4.content.ContextCompat is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 13) import android.app.AlertDialog; ^^^^^^^^^^^^^^^^^^^^^^^

    The import android.app.AlertDialog is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 14) import android.content.DialogInterface; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    The import android.content.DialogInterface is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 15) import android.Manifest; ^^^^^^^^^^^^^^^^

    The import android.Manifest is never used

    1. WARNING in C:\Users\Timori\AppData\Local\Temp\android3018523274746212225sketch\src\processing\test\array\MainActivity.java (at line 49) int check; ^^^^^

    The value of the local variable check is not used

    17 problems (17 warnings)

  • Notice those lines in your prev post are warnings. They will not stall your application.

    Kf

  • still the problem with Click "run on device" --> Lost connection with device while installing. Try again. debug: Failure [INSTALL_FAILED_DEXOPT] Shutting down any existing adb server...

  • edited April 21

    @NoOOoB===

    firstly be sure that you have not some older version of this app on your phone (supposing that you have tried to do something with AS); uninstall it if you can find it (app manager)

    if it does not work try to download the SDK from the android site (if you have installed AS it must be already present somewhere) - Then set the path to SDK for Processing to THIS SDK and not to the automatically downloaded by processing; you can fix that editing your processing preferences.txt.

    be sure that your manifest is targetting your phone; put it there.

Sign In or Register to comment.