【问题标题】:Play store says my app is supported by 0 devicesPlay 商店说我的应用受 0 台设备支持
【发布时间】:2017-10-16 18:50:57
【问题描述】:

我最近完成了我的第一个 Android 应用程序的构建。我今天将它发布到商店,但它说它支持 0 个设备。这是我的清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.guessthepicturespazam.guessit" >

    <application

        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="נחש את המילה"
        android:theme="@style/Theme.AppCompat.NoActionBar" >
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation"
            android:label="נחש את המילה"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".GameActivity"
            android:configChanges="orientation"
            android:label="@string/title_activity_game"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".Splash"
            android:configChanges="orientation"
            android:label="נחש את המילה"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".StoreActivity"
            android:label="@string/title_activity_store" >
        </activity>
        <activity
            android:name=".GameOverActivity"
            android:label="@string/title_activity_game_over" >
        </activity>
    </application>
    <supports-screens
        android:anyDensity="true"
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:resizeable="true" />

</manifest>

这是我的 build.grade 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.GuessTheWordZahal.guessit"
        minSdkVersion 10
        targetSdkVersion 23
        versionCode 2
        versionName "1.0.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    compile 'com.google.android.gms:play-services-ads:7.8.0'
}

我尝试在网上查找此问题,但找不到与我类似的问题。大多数应用程序没有受支持的设备,因为它们使用仅在某些设备中可用或在没有设备中可用的功能。我只是不知道我的问题是什么。我实际上已经在我的三星 Galaxy 上测试了这个应用程序,它运行良好。

【问题讨论】:

标签: android google-play android-manifest


【解决方案1】:

您需要提供支持的sdkVersion

<uses-sdk
        android:minSdkVersion="minimum(e.g "8")"
        android:targetSdkVersion="maximum(e.g "22")" />

【讨论】:

    【解决方案2】:

    如果您使用的是 Eclipse,请在清单文件中提及您的 minSdkVersion 和 maxSdkVersion;如果您使用的是 Android Studio,请在 build.gradle 文件中提及这些内容。

    对于 Eclipse

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.guessthepicturespazam.guessit"
        android:versionCode="1"
        android:versionName="1.0" >
    
        <uses-sdk android:minSdkVersion="8" 
            android:targetSdkVersion="21"/>
     .......................
    </manifest>
    

    适用于 Android Studio

    编辑您的 build.gradle 文件,如下所示

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.2"
    
        defaultConfig {
            applicationId "com.guessthepicturespazam.guessit"
            minSdkVersion 8
            targetSdkVersion 21
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
    
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    

    注意:如果您想在将来更新您的应用程序,版本名称和版本代码很重要。

    【讨论】:

    • 分享您的 build.gradle 文件以及更新后的清单文件
    【解决方案3】:

    您的清单不正确。

    <supports-screens>
    

    当前放置在应用程序标记中,但应向上移动到清单标记。 查看清单结构https://developer.android.com/guide/topics/manifest/manifest-intro.html#filestruct

    我想 play-store 解析器找不到支持屏幕信息并确定不支持屏幕。请更正清单并让我们知道。非常有趣的问题。

    【讨论】:

    • 我将supports-screens标签移动到应用标签,提交了新的apk作为更新(所以旧的没有发布),它仍然说它支持0个设备..
    • 您是否将 移到了 xml 的头部?我的意思是顺序很重要
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-26
    • 1970-01-01
    • 1970-01-01
    • 2018-12-07
    • 1970-01-01
    相关资源
    最近更新 更多