简体   繁体   中英

PTP_ERROR_IO when trying to run app on Android phone using Apportable

I am trying to convert an iOS app with UIKit using Apportable, and to debug it on my Android phone.

I am able to build and run the Tweejump sample from Apportable on my Sony Ericsson Xperia Arc S with Android 4.0.4 using the Starter Apportable. The device is connected via USB and USB debugging is enabled.

I have restored, repaired and restarted my device and that enabled me to run the Tweejump sample but when i try to build and run my own app, it states the following errors:

Finalizing Build/android-armeabi-debug/Chaser/Chaser-unaligned.apk
Signing APK with keys
Aligning Build/android-armeabi-debug/Chaser/Chaser-signed.apk
Loading...
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Found Sony Ericsson LT18i (BX902USN5N)
Could not get device foldersStarting: Intent { cmp=Cromian.CHASER/com.apportable.activity.VerdeActivity (has extras) }
Error type 3
Error: Activity class {Cromian.CHASER/com.apportable.activity.VerdeActivity} does not exist.

scons: done building targets.
Finished.

I have tried to build and run using the following commands: apportable load and EARLY_LIFECYCLE_DEBUG=yes apportable just_debug

And i have tried with USB connection mode set to MTP and also with MSC.

If i can get it to work i will consider going for the Indie plan.

Could anybody please help me?

UPDATE : When running the command EARLY_LIFECYCLE_DEBUG=yes apportable just_debug , on one of my other iOS apps, i receive the following output in the Terminal:

Running process NOT FOUND
1572 KB/s (9848 bytes in 0.006s)
Using Xcode breakpoints v2
am start -e EARLY_LIFECYCLE_DEBUG 1 -e NSUnrecognizedForwardingDisabled 1 -e WAIT_FOR_ATTACH 1 -n AndersFriis.CheckUd/com.apportable.activity.VerdeActivity
Starting: Intent { cmp=AndersFriis.CheckUd/com.apportable.activity.VerdeActivity (has extras) }
Attaching to pid 2108
Attached; pid = 2108
Listening on port 5039
GNU gdb (GDB) 7.5-https://github.com/apportable/gdb Feb 20 2014 18:49:38
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin12.4.0 --target=arm-elf-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Remote debugging from host 127.0.0.1
warning: Could not load shared library symbols for gralloc.msm7x30.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x2aabc4b0 in epoll_wait () from /Users/Anders/.apportable/cache/devices/BX902USN5N/libs/libc.so
$1 = 1
/Users/Anders/.apportable/SDK/Build/android-armeabi-debug/Check_ud/gdb/gdb.setup:18: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
(gdb) 

The app is just hanging at the "apportable beta" launch image and nothing happens.

UPDATE 2 : Error when running the command EARLY_LIFECYCLE_DEBUG=yes apportable debug :

[1/10] Writing Build/android-armeabi-debug/Check_ud/AndroidManifest.xml
[2/10] Creating Build/android-armeabi-debug/Check_ud/Check_ud-resources.apk and R.java files
[3/3] Building Build/android-armeabi-debug/Check_ud/Check_ud-debug.apk
Device 0 (VID=0fce and PID=514f) is a SonyEricsson LT15i Xperia Arc MTP+ADB.
Android device detected, assigning default bug flags
Found Sony Ericsson LT18i (BX902USN5N)
Could not get device foldersError: command failed: /Users/Anders/.apportable/SDK/bin/transfer /Users/Anders/.apportable/SDK/Build/android-armeabi-debug/Check_ud/Check_ud-debug.apk

Update 3 :

...
pull: /system/lib/libpower.so -> /Users/Anders/.apportable/cache/devices/BX902USN5N/libs/libpower.so
pull: /system/lib/lib_get_secure_mode.so -> /Users/Anders/.apportable/cache/devices/BX902USN5N/libs/lib_get_secure_mode.so
278 files pulled. 0 files skipped.
4500 KB/s (65824946 bytes in 14.284s)
1559 KB/s (9848 bytes in 0.006s)
Using Xcode breakpoints v2
am start -e EARLY_LIFECYCLE_DEBUG 1 -e NSUnrecognizedForwardingDisabled 1 -e WAIT_FOR_ATTACH 1 -n AndersFriis.CheckUd/com.apportable.activity.VerdeActivity
Starting: Intent { cmp=AndersFriis.CheckUd/com.apportable.activity.VerdeActivity (has extras) }
Attaching to pid 1935
Attached; pid = 1935
Listening on port 5039
GNU gdb (GDB) 7.5-https://github.com/apportable/gdb Feb 20 2014 18:49:38
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin12.4.0 --target=arm-elf-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Remote debugging from host 127.0.0.1
warning: Could not load shared library symbols for gralloc.msm7x30.so.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x2aabc4b0 in epoll_wait () from /Users/Anders/.apportable/cache/devices/BX902USN5N/libs/libc.so
$1 = 1
/Users/Anders/.apportable/SDK/Build/android-armeabi-debug/Check_ud/gdb/gdb.setup:18: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
(gdb) 

The " Could not get device folders " error comes from the transfer program failing.

Rebooting the device may solve the issue.

Otherwise, running MTP=no apportable load will run the slower, but perhaps more reliable adb to transfer the app to device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM