How to fix these Android Mode problems?

edited February 2018 in Android Mode

After facing more issues with the Android Mode in the last two days I think I got to the last problem: when I'm trying to run the code in the emulator it' says:

debug:
adb -s emulator-5554 install -r C:\Users\----\AppData\Local\Temp\android2772852432485972243sketch\bin\sketch_150308a-debug.apk
    status: 1
    200ms
    stdout:
rm failed for -f, Read-only file system
    stderr:
failed to copy 'C:\Users\----\AppData\Local\Temp\android2772852432485972243sketch\bin\sketch_150308a-debug.apk' to '/data/local/tmp/sketch_150308a-debug.apk': No such file or directory
Shutting down any existing adb server...
Exception in thread "AndroidDevice: logcat process monitor" java.lang.IllegalStateException: I didn't know about device emulator-5554!
    at processing.mode.android.Devices.deviceRemoved(Devices.java:245)
    at processing.mode.android.Device.shutdown(Device.java:258)
    at processing.mode.android.Device$1.run(Device.java:241)
    at java.lang.Thread.run(Unknown Source)
Exception in thread "AndroidDevice: logcat process monitor" java.lang.IllegalStateException: I didn't know about device emulator-5554!
    at processing.mode.android.Devices.deviceRemoved(Devices.java:245)
    at processing.mode.android.Device.shutdown(Device.java:258)
    at processing.mode.android.Device$1.run(Device.java:241)
    at java.lang.Thread.run(Unknown Source)

When I'm trying to run it on my android phone directly, nothing happens. After "debug:" doesn't write anything. Its not even detecting the device: Android > Select Device > "No connected devices". The computer recognized it (in My Computer > Portable Devices) when I pluged the USB in... and yes, I activated the "USB debugging mode" on my phone. Sorry if I wrote anything incorrectly, English is not my mother language. I hope somebody can help me. :((

Answers

  • @VargaEric:: difficult to (try!) to helpa you without knowing a) which is the code b) which is the plat form of your (real) device c) which are the min sdk target of your emulators && so on...

  • In the toolbar, click Debug for the Select Deployment Target window. afterwards you need to either connect a device via USB or click Create new virtual device to use the Android Emulator.

    In case you see a dialog asking if you want to "switch from Run to Debug," that means your app is already running on the device and it will restart in order to begin debugging. If you'd rather keep the same instance of the app running, click Cancel Debug and instead attach the debugger to a running app.

    Select a deployment target and click OK.

Sign In or Register to comment.