我可以一次上传3个APK到Play商店吗?

时间:2020-06-13 07:43:02

标签: android firebase flutter google-play apk

我的应用使用Firebase和Flutter(身份验证,cloud_firestore,google_sign_in ...)。 当我使用以下命令将其通过App Bundle上传到Play商店时: flutter build appbundle --target-platform android-arm,android-arm64,android-x64 我的应用程序无法在Firebase上正常使用,没有日志和崩溃报告。 但是当我使用APK时,它可以工作。 因此,我使用以下命令发布了多个APK文件:flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi,我的问题是可以将这3个文件上传到Play商店中的同一应用吗? 它也给了我一个警告:


Unoptimized APK
Warning:

This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices.

Resolution:

Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs.

我该怎么办? (我更喜欢使用APK,因为我的应用可以与APK一起使用)

软件包:

  google_sign_in: 4.5.1
  firebase_auth: 0.16.1
  firebase_core: ^0.4.0+8
  firebase_analytics: ^5.0.14
  cloud_firestore: ^0.13.6

app / build.gradle(android-> defaultConfig)我评论了NDK部分,因为APK不允许使用它。

    defaultConfig {
        applicationId "XXXXXX"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
        // ndk {
        //     abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
        // }
    }

    ...

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.release
            multiDexEnabled true
        }
    }

3 个答案:

答案 0 :(得分:1)

这只是一个警告,目的是让您知道APK的大小过大,这不是阻止错误。如果您无法发布您的应用程序,这不是原因:请确保您已填写所有商店清单(带有图片),在所有方框中打勾,填写隐私权政策等。

答案 1 :(得分:1)

您可以为同一个应用上传多个APK,只要它们针对不同的体系结构即可。我正在为我的应用做同样的事情。上面的警告可以忽略。

答案 2 :(得分:1)

我不建议这样做,只要3次打击,您就出局了。如果您犯了一个无意中违反条款和条件的错误,并且因此而导致某个应用被撤回,则可以纠正该问题并重新提交,但是如果所有三个应用都存在相同的问题,那么所有这些都将被撤消,并且您的帐户将被禁止。这很容易做到,所以我一次只推荐一个,每次上传之间留一个星期。当我无意中留下了指向自己的应用程序存储库的链接时,我就遇到了这种情况,它甚至不是可见的链接,但是外部链接当时与T&C背道而驰,而且可能仍然存在。他们不会和您说话,您也无权追索,所以请务必小心。