我的Android应用程序显示为与所有设备不兼容

时间:2017-03-13 17:35:47

标签: android google-play

我今天刚刚发布了一个Android应用程序,无论我删除了哪个uses-feature,我在哪个国家/地区提供应用程序,它都显示为无法在任何设备中使用。

这是指向应用Play Store的链接。该应用程序正在处理我所拥有的设备,但它们也显示为不兼容!我不知道为什么会出现这种情况,因为我之前已经发布了超过8个应用程序。

AndroidManifest

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <uses-feature android:name="android.permission.READ_PHONE_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@mipmap/ic_notification" />
        <!--
             Set color used with incoming notification messages. This is used when no color is set for the incoming
             notification message. See README() for more.
        -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_color"
            android:resource="@color/colorAccent" />

        <activity
            android:name=".activities.LoginActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_login"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.OtpActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_otp"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.AddAadhaarActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_pan_and_aadhaar"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.AddPanActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/title_activity_pan_and_aadhaar"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.HomeActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.White.Home"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.InvitationsActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.White.Home"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.PayNowActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.PaymentSentActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.CameraActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.White"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.IntroductionActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar.FullScreen"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".activities.SplashActivity"
            android:configChanges="orientation|screenSize"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar.Gradient">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <service android:name=".services.MessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service android:name=".services.InstanceIdService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

    </application>

</manifest>

的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.app"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 5
        versionName "1.1.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags "-fexceptions"
            }
        }
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile project(':zxing-wrapper')
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.android.support:cardview-v7:25.2.0'
    compile 'com.android.support:recyclerview-v7:25.2.0'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.firebase:firebase-crash:10.2.0'
    compile 'com.google.firebase:firebase-messaging:10.2.0'
    compile 'com.google.android.gms:play-services-base:10.2.0'
    compile 'com.google.android.gms:play-services-location:10.2.0'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

2 个答案:

答案 0 :(得分:0)

你的版本中可能有一个非常高的版本,关于可以支持每个设备的版本。

由于缺乏多语言支持,也可能没有其他国家。

Here documentation

答案 1 :(得分:0)

所以我想出了问题!事实证明,在我的清单中添加android:screenOrientation="portrait"会添加一个没有设备的功能android.hardware.screen.portrait!我删除了这一行,并使用java强制仅限肖像模式。这为我解决了这个问题!