【问题标题】:Why Can't I Publish My App On Google Play为什么我不能在 Google Play 上发布我的应用
【发布时间】:2023-01-12 13:25:16
【问题描述】:

我讨厌问这个问题,但有人可以帮我在 Google Play 商店上发布我的应用程序吗?通常,我在发布自己的应用程序时没有任何问题。然而,谷歌对商店允许使用哪些应用程序变得非常谨慎。我的应用笔记本允许用户做笔记,然后他们可以通过共享首选项或将其导出到 .txt 文件以保存他们的笔记条目以保存在他们的设备上。他们还可以将文件导入回应用程序。我的应用程序运行良好,问题是我的应用程序不符合他们的政策。我不确定要修复什么。我尝试按照他们的建议去做,但他们仍然拒绝了。请参阅下面的快照。我已经尝试发布这个应用程序一个月了,但被拒绝了 5 或 6 次。我很沮丧!

我已经从清单文件中删除了 MANAGE_EXTERNAL_STORAGE、WRITE_EXTERNAL_STORAGE 和 READ_EXTERNAL_STORAGE 权限。

我按照他们的建议使用了媒体商店

这是拒绝电子邮件的快照

https://i.stack.imgur.com/eJtI3.png (https://i.stack.imgur.com/Hfn0k.jpg)

这是我的清单和我的更改。

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

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.android.vending.BILLING"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Notebook"
        tools:targetApi="31"
        android:requestLegacyExternalStorage="true">
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-6771696786744697~1059060173"/>
            <!--android:value="ca-app-pub-3940256099942544~3347511713"/> Test ID-->
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            tools:ignore="LockedOrientationActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainActivityLandscape"
            android:screenOrientation="sensorLandscape"
            android:exported="true">
            <intent-filter>
                <action android:name="android.support.PARENT_ACTIVITY" />
                <category android:name="com.mathiasapps.notebook.MainActivityLandscape" />
            </intent-filter>
        </activity>
    </application>

</manifest>

这是他们建议我使用的媒体商店代码

 @SuppressLint("Recycle")
    public static void exportFile(Context context, String fileName, String fileExtension, String dataText) throws IOException {
        OutputStream outFile;

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {

            ContentValues contentValues = new ContentValues();

            contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, fileName + fileExtension);
            contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "text/plain");
            contentValues.put(MediaStore.MediaColumns.RELATIVE_PATH, "Documents/Notebook");

            Uri extUri = MediaStore.Files.getContentUri("external");
            Uri fileUri = context.getContentResolver().insert(extUri, contentValues);

            outFile = context.getContentResolver().openOutputStream(fileUri);

        }else {
            String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).toString() + "Notebook";
            File file = new File(path, fileName + fileExtension);
            outFile = new FileOutputStream(file);
        }

        byte[] bytes = dataText.getBytes();
        outFile.write(bytes);
        outFile.close();

        File checkFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).toString() + "/Notebook/" + fileName + fileExtension);
        if (checkFile.exists()) {
            Toast.makeText(context, "Note Exported Successfully!", Toast.LENGTH_SHORT).show();
        }else {
            Toast.makeText(context, "Export Failed!", Toast.LENGTH_SHORT).show();
        }

    }

不知何故,它仍然不合规。感谢您的帮助!

【问题讨论】:

  • 如果您删除了 MANAGE_EXTERNAL_STORAGE 但它仍然因为拥有它而被拒绝,请检查您使用的库是否不包含它。如果您在提交之前单击并拖动已签名的 bundle/APK 文件到 Android Studio 中,您可以查看最终合并的清单以进行检查。

标签: java android google-play


【解决方案1】:

你不需要删除WRITE_EXTERNAL_STORAGEREAD_EXTERNAL_STORAGE来自manifest.xml 的权限。只需取消选中“管理_外部存储

Google 在Android-R 或以上版本更改存储访问隐私 https://developer.android.com/about/versions/11/privacy/storage

【讨论】:

    猜你喜欢
    • 2020-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-26
    • 1970-01-01
    • 1970-01-01
    • 2014-05-13
    相关资源
    最近更新 更多