Android “您的设备与此版本不兼容”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10670002/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"your device isn't compatible with this version"
提问by snotyak
I put an app in the play store and my friend, who is running 4.0.3 on two devices, got the following message when trying to install my app : "your device isn't compatible with this version".
我在 Play 商店中放置了一个应用程序,我的朋友在两台设备上运行 4.0.3,在尝试安装我的应用程序时收到以下消息:“您的设备与此版本不兼容”。
One device allows it to install and the other doesn't. I allow for API 3-15 and both devices are 4.0.3. What's the problem?
一台设备允许它安装,而另一台则不允许。我允许 API 3-15 并且两个设备都是 4.0.3。有什么问题?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.snotyak.basicfuelcalcpro"
android:versionCode="2"
android:versionName="1.2.3" >
<uses-sdk
android:minSdkVersion="4" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".CalcApp"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/MainTheme" >
<activity android:name=".CalcActivity" >
</activity>
<activity
android:name=".PrefsActivity"
android:label="@string/prefs_name" />
<activity
android:name=".CalcTabView"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".AboutActivity"></activity>
<activity android:name=".HistoryActivity" />
<activity android:name=".AnalysisActivity" />
</application>
</manifest>
回答by Jeremy Edwards
Being that the 2 devices are on the same version the logical explanation that is causing the incompatibility message is that the devices are different and the app is using a feature that one of them doesn't support. Look at your AndroidManifest.xml and pay close attention to uses-feature
and uses-permission
tags. The Google Play store will use these to filter out devices that are not compatible.
由于这两个设备在同一版本上,导致不兼容消息的逻辑解释是设备不同,并且应用程序使用其中一个不支持的功能。查看您的 AndroidManifest.xml 并密切关注uses-feature
和uses-permission
标记。Google Play 商店将使用这些来过滤掉不兼容的设备。
For example if you have <uses-permission android:name="android.hardware.camera">
and one of the phone doesn't have a camera then it will be filtered out. Because the request for the permission implies that your app needs a camera to function properly. You can fix this by adding <uses-feature android:name="android.hardware.camera" android:required="false" />
into your AndroidManifest.xml. Of course, you'll also need code to safeguard your app from attempting to access the camera when it's not available.
例如,如果您有<uses-permission android:name="android.hardware.camera">
并且其中一部手机没有摄像头,那么它将被过滤掉。因为权限请求意味着您的应用需要摄像头才能正常运行。您可以通过添加<uses-feature android:name="android.hardware.camera" android:required="false" />
到您的 AndroidManifest.xml来解决此问题。当然,您还需要代码来保护您的应用程序在相机不可用时尝试访问它。
Look at this page for more information, Google Play Filters.
查看此页面了解更多信息,Google Play 过滤器。
Google Play has a way to indicate what's causing the device to be filtered out. It's very terse but go to the bottom of the page under devices and select Show Devices and then filter for Galaxy to verify that it's excluding based on manifest.
Google Play 有一种方法可以指示导致设备被过滤掉的原因。它非常简洁,但转到设备下的页面底部并选择显示设备,然后筛选 Galaxy 以验证它是否基于清单排除在外。
回答by Alex Lockwood
Double check the <uses-feature>
tag in your AndroidManifest.xml
file. It sounds like your application requires a feature that one of the devices doesn't support.
仔细检查文件中的<uses-feature>
标签AndroidManifest.xml
。听起来您的应用程序需要其中一个设备不支持的功能。
You should also check to see if you have the following declared in your AndroidManifest.xml
,
您还应该检查是否在您的AndroidManifest.xml
,
<uses-sdk
android:minSdkVersion="3" />
You want your application to work for devices running API 3 and above (not APIs 3 through 15). The code above will ensure that your application works with all devices above API 3. Note that you generally don't want to use the android:maxSdkVersion
attribute (if you are currently using it).
您希望您的应用程序适用于运行 API 3 及更高版本(而不是 API 3 到 15)的设备。上面的代码将确保您的应用程序适用于 API 3 以上的所有设备。请注意,您通常不想使用该android:maxSdkVersion
属性(如果您当前正在使用它)。
回答by snotyak
I got rid of
我摆脱了
<uses-sdk android:targetSdkVersion="15" />
and it works now.
现在可以使用了。
回答by Crime_Master_GoGo
Always things defined in Manifest, Google Playstore Filters out Your app to some devices. Something like:
总是在 Manifest 中定义的东西,Google Playstore 会将您的应用过滤到某些设备。就像是:
- Declared specific Target Sdk Version.
- Defined Camera permission(Will filter devices without Camera)
- Uses Feature Camera.
- SIM enabled device.
- Device with Wifi.
- Min sdk version.
- 声明了特定的目标 SDK 版本。
- 定义的相机权限(将过滤没有相机的设备)
- 使用功能相机。
- 启用 SIM 卡的设备。
- 带 Wifi 的设备。
- 最小sdk版本。
So, You have to keep in mind that you have to reach maximum devices for your target, you have to Opt out some of the features and Permissions.
因此,您必须记住,您必须为目标达到最大设备数,您必须选择退出某些功能和权限。
Hope this gives you idea about releasing App.
希望这能让你对发布应用程序有想法。