- 积分
- 45
贡献20
飞刀2 FD
注册时间2012-4-11
在线时间14 小时
|
发表于 2012-4-23 19:50:30
|
显示全部楼层
回复 2# 飞凌-chongzi
版主,我在使用这个程序做成main.apk,使用pm install /sdcard/main.apk
有两个问题:
1、我们ok6410开发板使用的是哪一个串口(编号)
2、我在开发板上设置完成之后,点击console,出现提示:串口应用程序异常关闭,请重试。我使用DDMS,有如下打印:
10-30 22:31:04.430: I/PackageManager(82): Linking native library dir for /data/app/android.serialport.sample-1.apk
10-30 22:31:04.480: I/PackageParser(82): android_serialport_api.sample: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE
10-30 22:31:04.480: I/PackageManager(82): Unpacking native libraries for /data/app/android_serialport_api.sample-1.apk
10-30 22:33:53.890: I/ActivityManager(82): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=android.serialport.sample/.MainMenu } from pid 179
10-30 22:33:54.090: I/ActivityManager(82): Start proc android.serialport.sample for activity android.serialport.sample/.MainMenu: pid=348 uid=10039 gids={}
10-30 22:33:55.050: I/ActivityManager(82): Displayed android.serialport.sample/.MainMenu: +989ms
10-30 22:33:56.370: I/ActivityManager(82): Starting: Intent { cmp=android.serialport.sample/.ConsoleActivity } from pid 348
10-30 22:33:56.450: W/ApplicationContext(348): Attempt to read preferences file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml without permission
10-30 22:33:57.210: I/ActivityManager(82): Displayed android.serialport.sample/.ConsoleActivity: +802ms
10-30 22:33:59.300: I/ActivityManager(82): Starting: Intent { cmp=android.serialport.sample/.SerialPortPreferences } from pid 348
10-30 22:33:59.420: D/SerialPort(348): Found new driver: /dev/s3c2410_serial
10-30 22:33:59.490: D/SerialPort(348): Found new device: /dev/s3c2410_serial0
10-30 22:33:59.490: D/SerialPort(348): Found new device: /dev/s3c2410_serial1
10-30 22:33:59.490: D/SerialPort(348): Found new device: /dev/s3c2410_serial2
10-30 22:33:59.490: D/SerialPort(348): Found new device: /dev/s3c2410_serial3
10-30 22:33:59.910: I/ActivityManager(82): Displayed android.serialport.sample/.SerialPortPreferences: +579ms
10-30 22:34:35.990: E/ApplicationContext(348): Couldn't rename file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml to backup file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml.bak
10-30 22:34:42.270: E/ApplicationContext(348): Couldn't rename file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml to backup file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml.bak
10-30 22:34:46.320: I/ActivityManager(82): Starting: Intent { cmp=android.serialport.sample/.ConsoleActivity } from pid 348
10-30 22:34:46.390: W/dalvikvm(348): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Landroid/serialport/SerialPort;
10-30 22:34:46.410: E/AndroidRuntime(348): at android.serialport.sample.Application.getSerialPort(Application.java:46)
10-30 22:34:46.410: E/AndroidRuntime(348): at android.serialport.sample.SerialPortActivity.onCreate(SerialPortActivity.java:78)
10-30 22:34:46.410: E/AndroidRuntime(348): at android.serialport.sample.ConsoleActivity.onCreate(ConsoleActivity.java:33)
10-30 22:34:46.410: E/AndroidRuntime(348): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load serial_port: findLibrary returned null
10-30 22:34:46.410: E/AndroidRuntime(348): at android.serialport.SerialPort.<clinit>(SerialPort.java:83)
10-30 22:34:46.420: W/ActivityManager(82): Force finishing activity android.serialport.sample/.ConsoleActivity
10-30 22:34:46.440: W/ActivityManager(82): Force finishing activity android.serialport.sample/.MainMenu
10-30 22:34:46.950: W/ActivityManager(82): Activity pause timeout for HistoryRecord{4073d350 android.serialport.sample/.ConsoleActivity}
10-30 22:34:57.540: W/ActivityManager(82): Activity destroy timeout for HistoryRecord{408101a0 android.serialport.sample/.MainMenu}
10-30 22:34:57.800: W/ActivityManager(82): Activity destroy timeout for HistoryRecord{4073d350 android.serialport.sample/.ConsoleActivity}
10-30 22:39:24.270: E/InputDispatcher(82): channel '40821960 android.serialport.sample/android.serialport.sample.MainMenu (server)' ~ Consumer closed input channel or an error occurred. events=0x8
10-30 22:39:24.270: E/InputDispatcher(82): channel '40821960 android.serialport.sample/android.serialport.sample.MainMenu (server)' ~ Channel is unrecoverably broken and will be disposed!
10-30 22:39:24.270: I/ActivityManager(82): Process android.serialport.sample (pid 348) has died.
10-30 22:39:24.330: I/WindowManager(82): WIN DEATH: Window{40821960 android.serialport.sample/android.serialport.sample.MainMenu paused=true}
10-30 22:39:31.010: I/ActivityManager(82): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=android.serialport.sample/.MainMenu } from pid 179
10-30 22:39:31.260: I/ActivityManager(82): Start proc android.serialport.sample for activity android.serialport.sample/.MainMenu: pid=934 uid=10039 gids={}
10-30 22:39:32.340: I/ActivityManager(82): Displayed android.serialport.sample/.MainMenu: +1s92ms (total +4m45s980ms)
10-30 22:39:33.950: I/ActivityManager(82): Starting: Intent { cmp=android.serialport.sample/.SerialPortPreferences } from pid 934
10-30 22:39:34.180: W/ApplicationContext(934): Attempt to read preferences file /data/data/android.serialport.sample/shared_prefs/android.serialport.sample_preferences.xml without permission
10-30 22:39:34.200: D/SerialPort(934): Found new driver: /dev/s3c2410_serial
10-30 22:39:34.280: D/SerialPort(934): Found new device: /dev/s3c2410_serial0
10-30 22:39:34.280: D/SerialPort(934): Found new device: /dev/s3c2410_serial1
10-30 22:39:34.280: D/SerialPort(934): Found new device: /dev/s3c2410_serial2
10-30 22:39:34.280: D/SerialPort(934): Found new device: /dev/s3c2410_serial3
对于这样的问题,占用版主较多的时间,还望谅解,谢谢! |
|