为什么Google Playstore上的支持设备列表为空

时间:2015-11-04 15:05:38

标签: android android-studio google-play google-play-services device

更新

因此,为了解决这个问题,我采取了启动新项目的方法,并逐渐尝试将其带入最终项目。以下片段似乎至少部分负责

<uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera2.autofocus"/>

在我添加该代码段之前,该列表包含了9202个设备,在我添加了代码段之后,该列表被删除为 0

原始问题

我过去使用eclipse发布了很多应用程序。这是我第一次发布使用android studio开发的应用程序。由于我的应用程序在移动游戏商店中不可见(即通过Android)并且在网上商店中显示This app is incompatible with all of your devices.,我开始调查以找出原因。对我来说,我发现这是我的Supported devices list

enter image description here

这很疯狂,因为我以前从未考虑过这一点。我有什么想法可能做错了吗?我使用adb工具将我的发布apk上传到我的设备没有问题。我的朋友说了

defaultConfig {

        applicationId "com.company.android"
    
    minSdkVersion 14

        targetSdkVersion 23
    
    versionCode 6

        versionName "0.0.06"

        multiDexEnabled true

    }
经过多次故障排除后,我现在甚至已添加到我的清单

<uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="23"/>

这是我的完整gradle文件:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.mycompany.android"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 6
        versionName "0.0.06"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            zipAlignEnabled true
        }
    }
    dexOptions {
        incremental true
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(path: ':cloud', configuration: 'android-endpoints')
    compile('com.twitter.sdk.android:twitter:1.9.0@aar') {
        transitive = true;
    }
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'com.google.android.gms:play-services-analytics:8.1.0'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.path:android-priority-jobqueue:1.1.2'
    compile 'com.google.android.gms:play-services-gcm:8.1.0'
    compile 'com.google.android.gms:play-services-appindexing:8.1.0'
    compile 'com.google.android.gms:play-services-location:8.1.0'
    compile 'com.google.android.gms:play-services-ads:8.1.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
}

我已经检查过apk已被激活。

清单:

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

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"/>

    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
    <!-- for notifications -->
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
    <uses-permission android:name="com.company.android.permission.C2D_MESSAGE"/>
    <!-- Additional permission for camera -->
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera2.autofocus"/>

    <application
        android:name=".Application"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">

        <!-- ACTIVITIES -->
        <activity
            android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:label="@string/app_name"
            android:launchMode="singleTop"
            android:windowSoftInputMode="adjustPan">
            <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.SEARCH"/>
            </intent-filter>
            <!-- deep linking for search engine -->
            <intent-filter android:label="@string/app_name">
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <!-- Accepts URIs that begin with "http://www.company.com” -->
                <data
                    android:host="www.company.com"
                    android:scheme="http"/>
            </intent-filter>

            <intent-filter android:label="@string/app_name">
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <!-- Accepts URIs that begin with "http://www.company.com/” -->
                <data
                    android:host="www.company.com"
                    android:pathPrefix="/"
                    android:scheme="http"/>
            </intent-filter>

            <intent-filter android:label="@string/app_name">
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <!-- Accepts URIs that begin with "https://www.company.com” -->
                <data
                    android:host="www.company.com"
                    android:scheme="https"/>
            </intent-filter>

            <intent-filter android:label="@string/app_name">
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <!-- Accepts URIs that begin with "http://www.company.com/” -->
                <data
                    android:host="www.company.com"
                    android:pathPrefix="/"
                    android:scheme="https"/>
            </intent-filter>

            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable"/>
        </activity>
        <activity
            android:name=".CameraActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_camera"/>
        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings"/>

        <activity
            android:name=".DogsWebPageActivity"
            android:label="@string/title_activity_Dogs_web_page"
            android:theme="@style/AppTheme">
            <!--<meta-data-->
            <!--android:name="android.support.PARENT_ACTIVITY"-->
            <!--android:value=".MainActivity"/>-->
        </activity>
        <!-- RECEIVERS -->
        <!-- for cloud messages -->
        <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
                <category android:name="com.company.android"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION"/>

                <category android:name="com.company.android"/>
            </intent-filter>
        </receiver>

        <!-- fragments for their adapters -->


        <!-- SERVICES -->
        <!-- for cloud messages -->
        <service
            android:name="com.company.android.data.service.companyGcmListenerService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
            </intent-filter>
        </service>
        <service
            android:name=".data.service.companyInstanceIDListenerService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID"/>
            </intent-filter>
        </service>
        <service
            android:name=".data.service.RegistrationIntentService"
            android:exported="false">
        </service>

        <!-- The DuckSyncAdapter service -->
        <service
            android:name=".data.contentprovider.sync.DuckSyncService"
            android:exported="true">
            <intent-filter>
                <action android:name="android.content.SyncAdapter"/>
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter"/>
        </service>

        <!-- syncadapter's dummy authenticator service -->
        <service android:name=".data.contentprovider.sync.DuckAuthenticatorService">
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator"/>
            </intent-filter>

            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator"/>
        </service>

        <!-- for adapters: data cache/providers -->
        <service
            android:name=".data.service.DogsService"
            android:exported="false"/>
        <service
            android:name=".data.service.RemoteDataService"
            android:exported="false"/>
        <service
            android:name=".data.service.VideoSearchService"
            android:exported="false"/>
        <!-- PROVIDERS -->
        <!-- Duck tab content provider -->
        <provider
            android:name=".data.contentprovider.VideoProvider"
            android:authorities="@string/content_authority"
            android:exported="false"
            android:syncable="true"/>
        <provider
            android:name=".data.contentprovider.companySearchRecentSuggestionsProvider"
            android:authorities="com.company.android.data.contentprovider.companySearchRecentSuggestionsProvider"/>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>
        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="somestring"/>

    </application>

</manifest>

1 个答案:

答案 0 :(得分:1)

没有android.hardware.camera2.autofocus,至少没有列在the docs for <uses-feature>中。 android.hardware.camera.autofocus(没有2)。除非您已经在某处看到了<uses-feature>,但请尝试切换到没有2的那个,看看您是否有更好的运气。