繁体   English   中英

为什么我不能在 Google Play 上发布我的应用程序

[英]Why Can't I Publish My App On Google Play

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

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

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

以下是拒绝 email 的截图

( 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();
        }

    }

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

您不需要从manifest.xml中删除WRITE_EXTERNAL_STORAGEREAD_EXTERNAL_STORAGE权限。 只需删除“ MANAGE_EXTERNAL_STORAGE ”。 允许。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM