【发布时间】:2016-01-02 22:36:59
【问题描述】:
我正在关注 this guide 在 API 10 上使用 com.android.future.usb 库。
我做了以下事情:
<uses-feature android:name="android.hardware.usb.accessory" />
(<manifest> 的直子)
<uses-library android:name="com.android.future.usb.accessory" />
(<application> 的孩子)
<meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/accessory_filter" />
(第一个activity 的孩子)
- 创建了
res/xml/accessory_filter.xml,如上所述here。
这样做让我可以使用com.android.future.usb 及其子类。但问题是manifest 更改后应用程序无法启动。
这是一个有根设备,并且该应用程序由操作系统配置为在设备启动时自动启动。
我应该做任何其他配置来完成这项工作吗?也许应该在固件中做点什么?
编辑:
这里是与 usb 相关的所有内容的 logcat:
USB mass storage support is not enabled in the kernerl
usb_configuration switch is not enabled in the kernerl
Volume usb state changing -1 (Initializing) -> 0 (No-Media)
Ignoring unknown switch 'usb_connected'
Package com.example.gui requires unavailable shared library com.android.future.usb.accessory: failing!
Skipping unknown volume '/mnt/usb'
USB Service
This kernel does not have USB configuration switch support
【问题讨论】:
-
But the problem is the application won't start after the changes in manifest.请说明您遇到的错误并将您的 logcat 粘贴到此处。