android-studio - 无法将新的 APK 文件上传到 Android Play 商店(Android 支付许可)

标签 android-studio build.gradle android-permissions android-pay

当我将新的 .apk 上传到 Google Play 商店时,它拒绝了我的提交,说:“您最近提交的应用程序因违反 Google Play 开发者计划政策而被拒绝。如果您提交了更新,您的应用程序的先前版本仍在 Google Play 上直播。”。

我收到一封邮件说:

We detected that at least one APK version in your recent upload isn’t using Android Pay correctly. Including APK version(s) 14 in your submission could cause your app to be rejected for violating our Payments policy.

If you’d like to use Android Pay in your app, please follow these steps:

Remove any digital content from your app. To use Android Pay, your app must only sell physical goods or services.
Make sure your app is compliant with all policies listed in the Developer Program Policies. Remember that additional enforcement could occur if there are further policy issues with your apps.
Sign in to your Developer Console and submit the app. Make sure to increment the version number of the APK.

If you’d like to use another payment method in your app, please follow these steps to remove Android Pay from your manifest:

Remove <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true"/> from your manifest.
Sign in to your Developer Console and submit the app. Make sure to increment the version number of the APK.

Policy issue: Android Pay or other alternative payment mechanisms to Google Play’s in-app billing service are only permitted for the following:

Android Pay
    For physical goods or services, such as movie tickets.

Other alternative payment mechanisms to Google Play’s in-app billing service
    For physical goods or services, such as movie tickets, or a publication where the price also includes a hard copy subscription.
    For digital goods that may be downloaded to devices and used outside of the app, such as songs that can be played on other music players.
    Donations to 527 designated tax exempt organizations are also permitted.

If you’ve reviewed the policy and feel this rejection may have been in error, please reach out to our policy support team. One of my colleagues will get back to you within 2 business days.

I appreciate your support of Google Play!

这是我的 list (已更新):

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.altergyan.appname" android:installLocation="auto" android:versionCode="15" android:versionName="@string/version">
        <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="com.android.vending.BILLING" />
        <uses-permission android:name="android.permission.STORAGE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <application
        android:name="com.altergyan.appname.Class_10"
        android:allowBackup="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:theme="@style/CustomActionBarTheme">
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_4"
            android:label="Category"
            android:parentActivityName="com.altergyan.appname.Class_20"
            android:windowSoftInputMode="stateHidden" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_20"
            android:label="@string/app_name"
            android:launchMode="singleTask" >
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_9"
            android:label="@string/title_activity_info"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_23"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            />
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_5"
            android:label="@string/favourites"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_22"
            android:label="@string/title_activity_settings">
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_13"
            android:label="@string/title_activity_agquizclass"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_15"
            android:label="@string/title_activity_agquizmap"
            android:parentActivityName="com.altergyan.appname.Class_13" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_13" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_17"
            android:label="@string/title_activity_quiz_play"
            android:parentActivityName="com.altergyan.appname.Class_15" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_15" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_16"
            android:label="@string/title_activity_quiz_options"
            android:parentActivityName="com.altergyan.appname.Class_15" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_15" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_19"
            android:label="@string/title_activity_record_phrase"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_7"
            android:label="@string/title_activity_flash_cards"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_2"
            android:label="@string/title_activity_alphabet"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_3"
            android:label="@string/title_activity_alphabet"
            android:parentActivityName="com.altergyan.appname.Class_20" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_20" />
        </activity>
        <activity
            android:screenOrientation="portrait"
            android:name="com.altergyan.appname.Class_6"
            android:label="@string/title_activity_flash_cards"
            android:parentActivityName="com.altergyan.appname.Class_7" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.altergyan.appname.Class_7" />
        </activity>
        <activity
            android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
        </activity>
    </application>
</manifest>

我没有使用任何与 Android Pay 相关的代码或功能。

我回信给谷歌,但得到的答案与第一封邮件中提到的相同:

Thanks for contacting the Google Play team.

Your app was flagged for Android Pay because you've included the declaration for Android Pay in the manifest of your app:

Please create a new build of your application without this element in your manifest and you will no longer be flagged for the review

Please let us know if you have any other questions or concerns.

我浏览了这里的帖子:Unable to upload new APK file to Android Play store (google pay) 它提到:“如果你不使用它,你必须在 gradle 构建文件中排除谷歌支付。” 但我该怎么做呢?

这是我的 gradle 构建文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "xyz"
        minSdkVersion 16
         targetSdkVersion 17
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles 'proguard-android.txt'
        }
    }
}
dependencies { 
   compile 'com.android.support:appcompat-v7:19.1.0'
   compile files('libs/acra-4.5.0.jar')
   //compile files('libs/android-support-v13.jar')
   compile files('libs/FlurryAds-5.3.0.jar')
   compile files('libs/FlurryAnalytics-5.3.0.jar')
   compile files('libs/flurryAndroidDFPandAdMobMediationAdapter-5.0.0.r1.jar')
   compile 'com.android.support:support-v4:22.2.0'
   compile 'com.google.android.gms:play-services:7.5.0'
}

最佳答案

而不是像下面这样实现所有播放服务:

dependencies {
   compile 'com.google.android.gms:play-services:7.5.0'
}

仅使用如下必要的服务。

dependencies {
   compile 'com.google.android.gms:play-services-ads:7.5.0'
   compile 'com.google.android.gms:play-services-maps:7.5.0'
}

关于android-studio - 无法将新的 APK 文件上传到 Android Play 商店(Android 支付许可),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36614172/

相关文章:

android - 如何从 Android 应用程序运行 root 命令?

具有自定义 lint 规则的索引循环中的 Android Studio

java - 使用 Picasso Android 时出现错误 RecyclerView

Android build gradle 太慢(依赖解析)

gradle - 从文件中读取字符串,并将其放入build.gradle文件中的数组

android - RemoteViewsFactory grantUriPermission 获取数据

android - 如何在 Android 中没有 SMS_READ 或类似权限的情况下发送短信并接收结果

android - 如何在android studio上实现VoIP sip客户端

android - RecyclerView TextView 中的超链接

android - 无法解决::tslocationmanager: