0个设备支持谷歌播放商店

时间:2016-07-25 16:47:50

标签: android google-play android-manifest build.gradle compatibility

我在上传新应用时遇到问题。上传工作正常,但它说它支持0设备。 我试过删除libaries(依赖gradle)并使用权限,但我似乎无法让它工作。

清单:

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

    <uses-permission android:name="com.southtune.smicker.permission.MAPS_RECIEVE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="com.southtune.smicker.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.App.Base">
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="******" />

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="******" />

        <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.southtune.smicker" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.southtune.smicker.gcm.MyGcmListenerService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>
        <service
            android:name="com.southtune.smicker.gcm.MyInstanceIDListenerService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID" />
            </intent-filter>
        </service>

        <activity
            android:name="com.southtune.smicker.Activities.SignInActivity"
            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="com.southtune.smicker.Activities.FullProfileMeActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity android:name="com.android.camera.CropImage" />
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity
            android:name="com.southtune.smicker.Activities.MainActivity"
            android:label="@string/main"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.TagListActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.ProfilePeekActivity"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.southtune.smicker.Activities.RegisterActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.FullProfileActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan">
        </activity>
        <activity
            android:name="com.southtune.smicker.Activities.RegisterFullProfileActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.SettingsActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.ChatActivity"
            android:label="@string/title_activity_chat"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.TagActivity"
            android:label="@string/title_activity_tag"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.TagListActivityNotTagged"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_tag_list_activity_not_tagged"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.EventMessageActivity"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_event_message"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.UpcomingEventActivity"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_upcoming_event"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.TagMainActivity"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_tag_main"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.ShowEventMessageActivity"
            android:screenOrientation="portrait"
            android:label="@string/title_activity_show_event_message"
            android:windowSoftInputMode="adjustPan"/>
        <activity
            android:name="com.southtune.smicker.Activities.ChangeProfileActivity"
            android:label="@string/title_activity_change_profile"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"/>
    </application>

</manifest>

摇篮:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
dependencies {
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'

    compile 'com.rockerhieu.emojicon:library:1.3.3'
    compile('org.apache.httpcomponents:httpmime:4.3.6') {
        exclude module: 'httpclient'
    }
    compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
    compile 'com.google.code.gson:gson:2.3'
    compile "com.google.android.gms:play-services:8.1.0"
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }

    compile 'org.apache.commons:commons-lang3:3.4'
}
android {
    compileSdkVersion 21
    buildToolsVersion "23.0.0"
    packagingOptions{
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    lintOptions {
        disable 'MissingTranslation'
    }
    defaultConfig {
        multiDexEnabled true
        applicationId "com.southtune.smicker"
        minSdkVersion 21
        targetSdkVersion 21
        versionCode 7
        versionName "1.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

我在设置中遗漏了什么?

1 个答案:

答案 0 :(得分:1)

我强烈建议您将项目中使用的所有库更新为最新版本:

dependencies{
   compile 'com.google.android.gms:play-services-maps:9.2.1'
   compile 'com.android.support:appcompat-v7:24.1.1'
   compile 'com.android.support:design:24.1.1'
   compile 'com.android.support:support-v4:24.1.1'
   compile 'com.android.support:cardview-v7:24.1.1'
}

大多数情况下,新版本中的错误已得到修复,因此建议您更新库版本 - 当然,您必须先通过SDK Manager下载它们!

我希望这有帮助!