不是重复的
情况:
我的应用程序专为智能手机设计,目前在 Google Play 商店中显示我的应用程序与我的设备不兼容,并且不支持任何设备。我已将我的应用程序的 APK 上传到 Google Play 商店 9 次,每次都会发生不同的更改。我已经完成了 15 个以上的堆栈溢出问题,并尝试了建议的不同答案,但没有任何帮助或没有任何效果。
我尝试过的和目前拥有的:
1. 在 AndroidManifest 中尝试了 Compatible screens 标签。
2. 在 AndroidManifest 中尝试了 Support-screens 标签。
3. 尝试两者。
4. 从 AndroidManifest 中删除了一些权限。
5. 目前所有的uses-feature 都有“false”作为要求。
6. 由于 Google Play 商店提示我我的 APK 是为平板电脑设计的,所以必须添加使用功能“android.hardware.telephony”。
7. 删除了不需要的和不必要的文件和代码 fragment (尽管我确实有一些 Java 文件,我在其中将类的整个代码 fragment 作为注释,我将来可能需要)。
8. 在 mipmap 文件夹中放置不同大小的应用程序 Logo (虽然我不确定这是否真的会产生影响)。
9. 目前,我只有一个布局文件夹,并没有为不同的屏幕尺寸设计不同的布局或布局文件夹,所以我不确定这是否会产生影响。
我的怀疑:
1. 可能是application theme,因为我没有在AndroidManifest 文件的“application”标签中定义apptheme。但是,我只在应用程序的父 Activity 中定义了 apptheme。
2. 可能是针对不同的屏幕尺寸没有不同的布局。
3. 可能是gradle 构建文件之一,我可能需要在其中更改某些内容,但我不知道它可能是什么。
4. 可能来自 AndroidManifest。
以下是我的 AndroidManifest.xml 文件。
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="my package">
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="480" />
<screen android:screenSize="small" android:screenDensity="640" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="560" />
<screen android:screenSize="normal" android:screenDensity="640" />
</compatible-screens>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.hardware.sensor.accelerometer"
android:required="false" />
<uses-feature
android:name="android.hardware.sensor.compass"
android:required="false" />
<uses-feature
android:name="android.hardware.sensor.gyroscope"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/applogo"
android:label="my app name"
android:supportsRtl="true"
android:fullBackupContent="true">
<service
android:name="com.indooratlas.android.sdk.IALocationService"
android:exported="false"
android:label="IALocationService" />
<meta-data
android:name="com.indooratlas.android.sdk.API_KEY"
android:value="My Key" />
<meta-data
android:name="com.indooratlas.android.sdk.API_SECRET"
android:value="My key" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="my package" android:pathPrefix="/main"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name=".IPS"
android:screenOrientation="portrait"
android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".BI"
android:screenOrientation="portrait"
android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".SH"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait"
android:parentActivityName=".MainActivity">
</activity>
<activity android:name=".Help"
android:screenOrientation="portrait"
android:parentActivityName=".MainActivity">
</activity>
</application>
</manifest>
以下是我的 build.gradle(app) 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "my package"
minSdkVersion 11
targetSdkVersion 23
versionCode 9
versionName "9.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.1.1'
compile 'com.indooratlas.android:indooratlas-android-sdk:2.0.0-beta@aar'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
}
我什至可能已经尝试了比我在这里所说的更多的东西。 如果有人知道 AndroidManifest 文件中有什么问题或我的 build.gradle 文件中有什么问题或基于我的怀疑可能有什么问题,那么我将不胜感激。非常感谢。
最佳答案
请删除所有这些行,然后重试。
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="480" />
<screen android:screenSize="small" android:screenDensity="640" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="560" />
<screen android:screenSize="normal" android:screenDensity="640" />
</compatible-screens>
如果您想添加平板电脑支持,请将您的应用程序设计为响应式并将平板电脑屏幕截图上传到 Playstore。就是这样。
希望它对你有用。
关于android - 谷歌应用商店 : "This app is incompatible with your device",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35379948/