diff --git a/app/src/processing/app/debug/Runner.java b/app/src/processing/app/debug/Runner.java index f882829df..580dbaa4b 100644 --- a/app/src/processing/app/debug/Runner.java +++ b/app/src/processing/app/debug/Runner.java @@ -77,8 +77,8 @@ public class Runner implements MessageConsumer { //private PrintStream leechErr; protected Editor editor; - protected Sketch sketch; - protected String appletClassName; + private Sketch sketch; + private String appletClassName; public Runner(RunnerListener listener) { diff --git a/app/src/processing/app/tools/android/Android.java b/app/src/processing/app/tools/android/Android.java index 8af691aa8..4cb0978da 100644 --- a/app/src/processing/app/tools/android/Android.java +++ b/app/src/processing/app/tools/android/Android.java @@ -236,6 +236,7 @@ public class Android implements Tool { }; emulatorProcess = Runtime.getRuntime().exec(cmd); System.out.println(PApplet.join(cmd, " ")); + // "emulator: ERROR: the user data image is used by another emulator. aborting" // make sure that the streams are drained properly new StreamRedirectThread("android-emulator-out", emulatorProcess.getInputStream(), System.out).start(); @@ -530,9 +531,11 @@ public class Android implements Tool { "-s", device, //"-d", // this is for a single USB device "shell", "am", "start", // kick things off - "-e", "debug", "true", - "-a", "android.intent.action.MAIN", "-n", - build.getPackageName() + "/." + build.getClassName() + "-D", // debug +// "-e", "debug", "true", + "-a", "android.intent.action.MAIN", + "-c", "android.intent.category.LAUNCHER", + "-n", build.getPackageName() + "/." + build.getClassName() }); int result = p.waitFor(); if (result != 0) { diff --git a/app/src/processing/app/tools/android/AndroidRunner.java b/app/src/processing/app/tools/android/AndroidRunner.java index af6f3b807..3f40820af 100644 --- a/app/src/processing/app/tools/android/AndroidRunner.java +++ b/app/src/processing/app/tools/android/AndroidRunner.java @@ -452,14 +452,23 @@ public class AndroidRunner extends Runner { // Any of the thread.blah() methods can throw an AbsentInformationEx // if that bit of data is missing. If so, just write out the error // message to the console. + + Sketch sketch = editor.getSketch(); + String appletClassName = sketch.getName(); // TODO * not yet correct! * + + List framey = thread.frames(); + for (StackFrame frame : framey) { + System.out.println("frame: " + frame); + } List frames = thread.frames(); for (StackFrame frame : frames) { - System.out.println("frame: " + frame); +// System.out.println("frame: " + frame); Location location = frame.location(); String filename = null; filename = location.sourceName(); lineNumber = location.lineNumber(); + String appletJavaFile = appletClassName + ".java"; SketchCode errorCode = null; if (filename.equals(appletJavaFile)) {