我刚刚制作了一个在“HUAWEI T1-701u”和“HUAWEI T1-A21L”上测试的 android 应用程序,我生成了一个签名的 apk,现在已在 Play 商店上发布, 问题是该应用程序只能在任何我期望的 HUAWEI T1-701u 上运行,即使我在其上进行了测试,它也会这样说:应用程序与该设备不兼容,即使我在其上进行了测试。 这是 list
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<supports-screens android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="100" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
这是gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "org.iowpjordan.mpic"
minSdkVersion 12
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
}
请注意,HUAWEI T1-701u的屏幕尺寸为7寸,另一款约为10寸
请指教。 问候。
最佳答案
manifest 中的功能太敏感了,如果你把一个无用的功能放在你的手机上,而你的手机上没有它,那么该应用程序将与你的手机不兼容
如果您不使用自动对焦,请删除此行 <uses-feature android:name="android.hardware.camera.autofocus" />
因为您正在测试的手机没有自动对焦功能!这就是该应用与您的设备不兼容的原因
关于android - 此应用与您的设备不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38819779/