应用程序需要您的设备上不可用的功能
我在 Android Market 上有一个 Android 应用程序,但一些用户抱怨安装开始时、下载后显示的错误:
一段显示此错误的视频,我可以看到此错误不是由应用程序引起的,而可能是在权限/功能验证过程中引起的。
据我所知,这个错误只发生在运行 Eclair 的 Motorola Droid/Milestone 设备上,而 Froyo 则不会发生。不幸的是,我无法访问任何像这样的设备来运行 logcat 并检查发生了什么。
以下是我对 AndroidManifest.xml 的权限/功能:
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.telephony" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
I have an Android application on Android Market, but some users are complaining about an error shown when the installation starts, just after the download:
One of them sent me a video of this error showing up, and I could see that this error is not caused by the application, but probably in the verification of permission/features process.
As far as I know, this error is just happening on Motorola Droid/Milestone devices running Eclair, it doesn't happen with Froyo. Unfortunately, I don't have access to any device like this one in order to run logcat and check what's going on.
Here are my permission/features on AndroidManifest.xml:
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.telephony" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我终于通过获取 Droid 设备并运行 logcat 发现发生了什么:
E/PackageManager( 1280): Package com.mycompany.myapp require unavailable feature android.hardware.telephony;失败了!
运行 Eclair 的 Motorola Droid 设备无法安装
在其清单中声明的应用程序。但这很奇怪,因为 Android Market 应该对这些设备隐藏它。这可能是摩托罗拉对 Eclair 进行更改导致的错误,因为运行 Eclair 的其他设备不会发生这种情况,运行 Froyo 的同一个 Droid 也不会发生这种情况。
I finally found out what's happening by getting a Droid device and running logcat:
E/PackageManager( 1280): Package com.mycompany.myapp requires unavailable feature android.hardware.telephony; failing!
Motorola Droid devices running Eclair are not able to install applications that declare
in their manifest. It's very strange, though, because the Android Market should hide it from these devices. This is probably a bug caused by the changes made to the Eclair by Motorola, since it doesn't happen with other devices running Eclair, neither with the same Droid running Froyo.
根据 文档:
鉴于此,您是否尝试删除使用功能标签?由于这些是由使用暗示 -permissions 标签,并且您没有使用“android:required”属性。
According to the docs:
Given that, have you tried removing the uses-feature tags? Since those are implied by the uses-permissions tags, and you aren't using the "android:required" attribute.
当我安装从 Play 商店下载的应用程序时,设备显示“此功能在此设备中不可用”,并且我必须授予它权限
The device say " this feature is not available in this device " when I'm installing an app downloaded from play store and i have to give it permission