Android Mode: Error when hitting "Run"

edited October 2013 in Android Mode

Hi There, In trying to run the first tutorial for Android [a white square in a yellow background], I first got a compile error related to 'google-10' which after searching was related to an earlier API 10 not being installed when the Android SDK was installed [It installed the latest 18] Once I fixed that, the program gave the appearance of compiling in the emulator and running but did not result in the graphic like one sees in Java mode. Here is the output I received which is baffling me: [Help me wizards of Processing! :) ]

"-set-mode-check:

-set-debug-files:

-check-env: Android SDK Tools Revision 22.2.1 Installed at /Applications/adt-bundle-mac-x86_64-20130917/sdk

-setup: [echo] Project Name: DroidTest Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup: Using latest Build Tools: 18.1.0 [echo] Resolving Build Target for DroidTest... Project Target: Android 2.3.3 API level: 10 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/rsObj [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/rsLibs [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/gen [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/classes [mkdir] Created dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for DroidTest... Library dependencies: No Libraries


API<=15: Adding annotations.jar to the classpath. [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on

-code-gen: Merging AndroidManifest files into one. Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... Generating BuildConfig class.

-pre-compile:

-compile: [javac] Compiling 3 source files to /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/classes

-post-compile:

-obfuscate:

-dex: input: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/classes input: /Applications/adt-bundle-mac-x86_64-20130917/sdk/tools/support/annotations.jar input: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/libs/processing-core.jar Pre-Dexing /Applications/adt-bundle-mac-x86_64-20130917/sdk/tools/support/annotations.jar -> annotations-75611dc9d18cd9d06a5a64f156ed0749.jar Pre-Dexing /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/libs/processing-core.jar -> processing-core-dddb8f41533a9ecf19ba271388516480.jar Converting compiled files and external libraries into /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/classes.dex... [dx] Merged dex A (6 defs/2.2KiB) with dex B (2 defs/1.1KiB). Result is 8 defs/3.2KiB. Took 0.0s [dx] Merged dex A (8 defs/3.2KiB) with dex B (203 defs/686.6KiB). Result is 211 defs/812.4KiB. Took 0.3s

-crunch: [crunch] Crunching PNG Files in source dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/res [crunch] To destination dir: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res [crunch] Processing image to cache: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/res/drawable-hdpi/icon.png => /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable-hdpi/icon.png [crunch] (processed image to cache entry /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable-hdpi/icon.png: 47% size of source) [crunch] Processing image to cache: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/res/drawable-ldpi/icon.png => /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable-ldpi/icon.png [crunch] (processed image to cache entry /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable-ldpi/icon.png: 0% size of source) [crunch] Processing image to cache: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/res/drawable/icon.png => /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable/icon.png [crunch] (processed image to cache entry /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/res/drawable/icon.png: 0% size of source) [crunch] Crunched 3 PNG files to update cache

-package-resources: Creating full resource package... [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

-package: Current build type is different than previous build: forced apkbuilder run. Creating DroidTest-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug: Running zip align on final apk... [echo] Debug Package: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/DroidTest-debug.apk [propertyfile] Creating new property file: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/build.prop [propertyfile] Updating property file: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/build.prop [propertyfile] Updating property file: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/build.prop [propertyfile] Updating property file: /var/folders/1x/q3d8dlq12fn8xy_c42z1j9gc0000gp/T/android2953269933497918693sketch/bin/build.prop

-post-build:

debug: Shutting down any existing adb server...

lost connection with device while launching. Try again"

Thanks!

Answers

  • That's an error in connecting with either a device or an emulator. Are you attempting to run the app on a device or on an emulator? If you're trying to run it on a device, is it set up properly? I created a list of common problems on the old forum... perhaps I should begin to create a new one / migrate the old one over.

  • edited October 2013

    Some times that happens to me too, try it a few times. If it still doesn't work, just keep reading random things about android mode and finally you will solve it. (It took me a week to get android mode working properly).

Sign In or Register to comment.