sketch doesn't work on a device, app probably started but gone immediately.

Hi! I'm just starting Processing android mode.

  • device : Samsung Galaxy Tab E 8.0
  • os : android 6.0.1
  • Processing ver. : 3.3.2
  • android mode ver. : 4.0 prereleases

After running a sketch(getting started example), the screen of a device turned black, but immediately the app is gone and the messase "Unfortunately, sketch_xxxx has stopped."

The below is error message on a console of Processing. Thanks in advance for any help!


FATAL EXCEPTION: main Process: processing.test.sketch_170429a, PID: 24633 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{processing.test.sketch_170429a/processing.test.sketch_170429a.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3132) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7406) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1096) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3122) ... 9 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/processing.test.sketch_170429a-2/base.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:295) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexFile.(DexFile.java:59) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279) at dalvik.system.DexPathList.makePathElements(DexPathList.java:248) at dalvik.system.DexPathList.(DexPathList.java:120) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.(PathClassLoader.java:65) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:86) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:47) at android.app.LoadedApk.getClassLoader(LoadedApk.java:438) at android.app.LoadedApk.makeApplication(LoadedApk.java:663) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6469) at android.app.ActivityThread.access$1800(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) ... 6 more Suppressed: java.lang.ClassNotFoundException: processing.test.sketch_170429a.MainActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available FATAL EXCEPTION: main Process: processing.test.sketch_170429a, PID: 24952 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{processing.test.sketch_170429a/processing.test.sketch_170429a.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3132) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7406) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1096) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3122) ... 9 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/processing.test.sketch_170429a-2/base.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:295) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexFile.(DexFile.java:59) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279) at dalvik.system.DexPathList.makePathElements(DexPathList.java:248) at dalvik.system.DexPathList.(DexPathList.java:120) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.(PathClassLoader.java:65) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:86) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:47) at android.app.LoadedApk.getClassLoader(LoadedApk.java:438) at android.app.LoadedApk.makeApplication(LoadedApk.java:663) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6469) at android.app.ActivityThread.access$1800(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) ... 6 more Suppressed: java.lang.ClassNotFoundException: processing.test.sketch_170429a.MainActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available FATAL EXCEPTION: main Process: processing.test.sketch_170429a, PID: 24972 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{processing.test.sketch_170429a/processing.test.sketch_170429a.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3132) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7406) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1096) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3122) ... 9 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/processing.test.sketch_170429a-2/base.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:295) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexFile.(DexFile.java:59) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279) at dalvik.system.DexPathList.makePathElements(DexPathList.java:248) at dalvik.system.DexPathList.(DexPathList.java:120) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.(PathClassLoader.java:65) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:86) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:47) at android.app.LoadedApk.getClassLoader(LoadedApk.java:438) at android.app.LoadedApk.makeApplication(LoadedApk.java:663) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6469) at android.app.ActivityThread.access$1800(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) ... 6 more Suppressed: java.lang.ClassNotFoundException: processing.test.sketch_170429a.MainActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available FATAL EXCEPTION: main Process: processing.test.sketch_170429a, PID: 24993 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{processing.test.sketch_170429a/processing.test.sketch_170429a.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3132) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7406) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.ClassNotFoundException: Didn't find class "processing.test.sketch_170429a.MainActivity" on path: DexPathList[[zip file "/data/app/processing.test.sketch_170429a-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.sketch_170429a-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1096) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3122) ... 9 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/processing.test.sketch_170429a-2/base.apk at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:295) at dalvik.system.DexFile.(DexFile.java:80) at dalvik.system.DexFile.(DexFile.java:59) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:279) at dalvik.system.DexPathList.makePathElements(DexPathList.java:248) at dalvik.system.DexPathList.(DexPathList.java:120) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.(PathClassLoader.java:65) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:86) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:47) at android.app.LoadedApk.getClassLoader(LoadedApk.java:438) at android.app.LoadedApk.makeApplication(LoadedApk.java:663) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6469) at android.app.ActivityThread.access$1800(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) ... 6 more Suppressed: java.lang.ClassNotFoundException: processing.test.sketch_170429a.MainActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Answers

  • Answer ✓

    From this link: https://forum.processing.org/two/discussion/comment/94848/#Comment_94848

    Kf

    Processing version

    Android mode Version

    Operating system

    Target APIs you have tried (Installed through the Android SDK manager and visible in the Processing IDE Android mode)

    Android SDK version. Did you install it yourself or using the automatic installation offered by the Processing IDE android mode?

    Have you run Android apps in Processing before? In any other SDK like Eclipse or Android Studio (AS)?

    Is this your first time? Did you enabled the developer mode in your device?

    did you check the following website as a reference: http://android.processing.org/install.html Did you try any other set of instructions? Which ones? Can you provide your link?

    Are you running your app in an actual device or through an emulator? (NOTE: It is strongly recommended to do it on an actual device)

    In case you found something meaningful in the forum or in other site, please provide links (If nothing found... leave blank).

    Have you tried anything else? For example, renaming/removing the manifest and letting Processing recreate the manifest for you again? (To access the manifest, press ctrl+k in your sketch and there should be a file called "manifest.xml")

    EDITED:****** Extra questions as suggested by akenaton

    Have you activated the debug mode on your phone + what is your phone OS ? ) + give us more error code (not only the first 2 lines)

  • Answer ✓

    @Swann===

    • dont use the 4 prerelease mode

    • download the android SDK from the android site

    • unzip it and put it where you want (not in the mode folder from P5)

    • change the path to SDK (in processing preferences.txt)

  • Thanks! @kfrajer @akenaton I think the problem solved even though there remain small errors.

    I installed Android Studio then updated SDK tools to r25.2.5 and changed the SDK path in "preference.txt" to that of AS.

    4.0 prerelease also works.

Sign In or Register to comment.