我的Android应用程序被PlayStore拒绝了

时间:2019-05-16 07:30:20

标签: android android-manifest android-permissions developer-console

我正在将应用程序上载到Android PlayStore中,但由于其中具有 SMS权限而被拒绝了,但是在我的 Manifest.xml 文件中有未添加短信权限

与Google团队进行对话后,他们说短信允许使用,但我找不到它。

下面是Google小组提供的屏幕截图,并且该屏幕截图具有短信权限。

Screenshot shared by Google Team

我的清单文件看起来像这样

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.msonline.android">

    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <application
        android:name=".ApplicationClass"
        android:allowBackup="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/MSOAppTheme"
        tools:ignore="AllowBackup,GoogleAppIndexingWarning"
        tools:replace="android:allowBackup,android:icon,android:label,android:theme">

//Other declarations of Activities

    </application>

</manifest>

在此先感谢任何帮助。

编辑#1

  

build.gradle

    apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "package name"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 31
        versionName "4.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                    multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            debuggable false
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        checkReleaseBuilds false
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true
    }
    implementation 'pub.devrel:easypermissions:1.3.0'
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
    implementation 'com.onesignal:OneSignal:3.10.3'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-config:16.4.1'
    implementation "com.google.firebase:firebase-core:16.0.8"
    implementation 'com.facebook.fresco:fresco:1.7.1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation('com.payumoney.sdkui:plug-n-play:1.0.0') {
        transitive = true;
        exclude module: 'payumoney-sdk'
    }
    implementation 'com.payumoney.core:payumoney-sdk:7.1.0'
//    implementation 'com.google.android.gms:play-services-ads:17.1.1'
    implementation 'com.google.android.gms:play-services-ads:17.2.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'


    implementation project(':libraryMobilePaymentSDKLive')
}
apply plugin: 'com.google.gms.google-services'
  

添加了Lib清单

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.atom.library_mobilepaymentsdk"
android:versionCode="3"
android:versionName="3.3" >

<application
    android:allowBackup="true"
    android:icon="@drawable/process"
    android:label="atom payment SDK"
    android:theme="@android:style/Theme.Holo.Light" >
</application>

2 个答案:

答案 0 :(得分:6)

第三方库也有助于您创建权限树。在您的情况下,您正在使用的以下库在清单中声明了RECEIVE_SMS

com.payumoney.sdkui:plug-n-play:1.0.0

您可以在此link下面使用sdk的git repo中的sdk清单进行检查。

清单中定义了RECEIVE_SMS。

<uses-permission
        android:name="android.permission.RECEIVE_SMS"
android:protectionLevel="signature" />

您可以尝试删除此权限,首先在清单tools:node="remove"中声明,然后添加

<uses-permission android:name="android.permission.RECEIVE_SMS" tools:node="remove" />

最终合并的清单不会包含RECEIVE_SMS

答案 1 :(得分:2)

您肯定正在使用添加此权限的第三方库。 您可以尝试删除此权限,首先在清单tools:node="remove"中声明,然后添加

<uses-permission android:name="android.permission.RECEIVE_SMS" tools:node="remove" />

最终合并的清单不会包含RECEIVE_SMS