【问题标题】:Google Play Store: "This app is incompatible with your device"Google Play 商店:“此应用与您的设备不兼容”
【发布时间】:2016-02-13 12:39:24
【问题描述】:

不是重复的

情况
我的应用专为智能手机设计,目前在 Google Play 商店中显示我的应用与我的设备不兼容,也不支持任何设备。我在 Google Play 商店上传了我的应用程序的 APK 9 次,每次都发生了不同的变化。我已经解决了 15 多个堆栈溢出问题并尝试了不同的答案,但没有任何帮助或没有任何效果。

我尝试过的和目前拥有的
1.尝试了AndroidManifest中的Compatible screen标签。
2. 在 AndroidManifest 中尝试了 Support-screens 标签。
3. 尝试了both
4. 从 AndroidManifest 中删除了一些权限
5.所有uses-feature目前都有“false”作为要求。
6. 不得不把 uses-feature "android.hardware.telephony" 因为 Google Play 商店提示我我的 APK 是为平板电脑设计的
7. 删除了不需要的和不必要的文件和代码sn-ps(虽然我确实有一些Java文件,我已经将类的整个代码sn-p作为我将来可能需要的注释) .
8.在mipmap文件夹中放置不同大小的应用程序标志(虽然我不确定这是否真的会产生影响)。
9.目前我只有一个布局文件夹,并没有为不同的屏幕尺寸设计不同的布局或布局文件夹,所以不知道这是否有效果。

我的怀疑
1. 可能是应用程序主题,因为我没有在AndroidManifest 文件的“application”标签中定义apptheme。但是,我只在应用程序的父活动中定义了 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 文件有什么问题,或者基于我的怀疑可能有什么问题,那么我将不胜感激。非常感谢。

【问题讨论】:

  • 您找到解决方案了吗?我面临同样的问题,我们分享了我们尝试过的相同列表。

标签: android google-play android-manifest


【解决方案1】:

请删除所有这些行,然后重试。

<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。就是这样。

希望它对你有用。

【讨论】:

  • 我会尝试你的建议,我无意为智能手机和平板电脑制作我的应用程序,所以目前只使用智能手机。谢谢你的回答。
【解决方案2】:

通过使用内置样式和主题,您的应用自然会在每个新版本中遵循 Android 的最新外观。

因此,您需要在应用程序标签中添加主题,至少是一个内置主题,但没有定义主题,没有可能的设备可以运行“无主题”应用程序。所以,

1) 确保您在 styles.xml 下有类似这样的内容:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
</style>

2) 在应用程序标签的清单中,

android:theme="@style/AppTheme"

你能检查一下吗

【讨论】:

  • 所以我想我的怀疑是正确的。是的,我的 styles.xml 文件中确实有这些代码行。我一定会尝试你的建议,并会让你知道结果。非常感谢您提供这些信息。
  • 试过了,没用。经过这些努力,真的不知道问题出在哪里。
猜你喜欢
  • 1970-01-01
  • 2017-08-25
  • 2018-07-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多