标签: android-app-bundle

FLUTTER Android Studio BUMBLEBEE:生成签名包需要您将 Android Gradle 插件更新到版本 3.2.0 或更高版本

当我尝试build > generate signed bundle AS 抱怨时:

生成签名包需要您将 Android Gradle 插件更新到版本 3.2.0 或更高版本

如果我单击Close this dialog and update the plugin 另一个对话框(AS Bumblebee),标题为“update the Android Gradle plugin如果我点击确定”,该对话框就会消失,什么也不会发生,当我尝试再次构建签名的应用程序包时,我会收到相同的抱怨。

这真的很令人沮丧,因为我无法在没有签名的情况下使用 Googlemaps 上传应用程序。这就是我的整个应用程序!

好吧,类似的问题已经在 StackOverflow 上得到了多次解答,但有些解决方案已经过时,其他解决方案似乎不相关:

  1. 我看不到如何通过 Android Studio Bumblebee 更新 Gradle File > project structure
  2. 如果我尝试在 中手动更新 Gradle android/build.gradle,那么它已经有 gradle 7.03,远高于 3.2.0。虽然Gradle和Android Studio的Gradle插件可能有不同的版本号。请参阅下面的代码片段。
  3. 我尝试使用 Android Studio 的搜索框和“更新 Gradle 插件”,但没有效果。
  4. 我四处寻找Preferences > SDK tools,但没有提到 gradle 插件。
  5. 我没有使用应用程序包,而是尝试生成签名的 APK,但这也有问题,而且文件较大,因此没有简单的解决方案。

这是我的文件的相关部分android/build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:7.0.3'
    classpath …
Run Code Online (Sandbox Code Playgroud)

build.gradle android-gradle-plugin flutter android-app-bundle

17
推荐指数
1
解决办法
8199
查看次数

如何使用Gradle更改应用程序包的生成文件名?

因此,要在gradle android中更改生成的APK文件名,我可以执行以下操作:

applicationVariants.output.all {
    outputFileName = "the_file_name_that_i_want.apk"
}
Run Code Online (Sandbox Code Playgroud)

生成的App Bundle文件有类似的东西吗?如何更改生成的App Bundle文件名?

android gradle android-gradle-plugin android-app-bundle

16
推荐指数
5
解决办法
4216
查看次数

如何安装bundletool?

虽然文档提到

如果尚未这样做,请从GitHub 存储库下载bundletool 。

但是,存储库仅包含一个jar文件。如何安装它,以便可以像文档示例一样使用“ bundletool”命令运行。

android android-app-bundle

16
推荐指数
6
解决办法
8393
查看次数

是否可以将新的Android应用捆绑包架构与RN 0.57一起使用?

应用程序捆绑包:https : //developer.android.com/guide/app-bundle/这使Google Play可以管理签名,减小应用程序大小并允许按需提取代码,这真是太棒了!

我尝试进行设置,但是Android Studio不断告诉我我需要更新gradle版本吗?

这是我的build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

task wrapper(type: Wrapper) {
    gradleVersion = '4.4' //version required
}

buildscript {
    repositories {
        /**
         * Must stay in this order
         */
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
    }
}

subprojects {
    afterEvaluate { project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27
            }
        }
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { …
Run Code Online (Sandbox Code Playgroud)

android react-native react-native-android android-app-bundle

14
推荐指数
2
解决办法
3800
查看次数

如何在 Ionic 应用程序中使用 Android App Bundle?

嗨,我正在使用 android 应用程序,当我尝试上传开发者控制台时显示消息,“在此处输入图片说明

我希望我们可以通过它减少应用程序的大小,我尝试了不同的方法,但我无法理解。请帮帮我。有没有可能做到这一点。

android ionic-framework android-app-bundle

14
推荐指数
2
解决办法
1万
查看次数

如何修复“ Gradle构建无法产生Android捆绑包”。在Flutter

运行 flutter build appbundle时,出现以下错误:Gradle构建无法生成Android捆绑包。

在详细模式下运行时,这是我另外得到的:

#0      throwToolExit (package:flutter_tools/src/base/common.dart:24:3)
#1      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:585:7)
<asynchronous suspension>
#2      buildGradleProject (package:flutter_tools/src/android/gradle.dart:331:14)
<asynchronous suspension>
#3      buildAppBundle (package:flutter_tools/src/android/app_bundle.dart:43:10)
<asynchronous suspension>
#4      BuildAppBundleCommand.runCommand (package:flutter_tools/src/commands/build_appbundle.dart:43:11)
<asynchronous suspension>
#5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:545:18)
#6      _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#7      _rootRunUnary (dart:async/zone.dart:1132:38)
#8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#12     Future._complete (dart:async/future_impl.dart:473:7)
#13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#14     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13) …
Run Code Online (Sandbox Code Playgroud)

build android-gradle-plugin flutter android-app-bundle

12
推荐指数
1
解决办法
4041
查看次数

如何在设备上部署 aab 文件?

在我的 android 应用程序中,如果我想更新 APK 文件,我使用这个:

adb install -r some_my.apk
Run Code Online (Sandbox Code Playgroud)

好的。这是工作。现在我签署了我的包,结果是 Android Studio 3.5。生成:AAB(Android App Bundle)文件。好的。

现在我从 Google Play 安装 prev 应用程序。我想通过AAB更新我的应用程序。

我怎么能做到这一点?

如果我试试这个:

adb install -r some_my.aab
Run Code Online (Sandbox Code Playgroud)

我得到错误:

adb.exe: need APK file on command line
Run Code Online (Sandbox Code Playgroud)

android android-install-apk android-app-bundle

12
推荐指数
1
解决办法
9023
查看次数

在 App Update API 中总是返回 1 (UPDATE_NOT_AVAILABLE)

In-App Update API在应用程序中使用更新应用程序,而新版本在 Play 商店中可用。

模块gradle

defaultConfig {
        applicationId "xxx.xxxxx"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode rootProject.ext.vCode
        versionName rootProject.ext.vName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
Run Code Online (Sandbox Code Playgroud)

上次上传版本(在 Playstore 中直播)

vCode = 5
vName = "1.0.4"
Run Code Online (Sandbox Code Playgroud)

项目 gradle(将其降级以进行测试)

vCode = 4
vName = "1.0.3"
Run Code Online (Sandbox Code Playgroud)

降级此版本以获取可用或不可用的测试更新。

主活动.kt

class MainActivity : AppCompatActivity() {
    private var appUpdateManager: AppUpdateManager? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        appUpdateManager = AppUpdateManagerFactory.create(this)
    }

    override fun onResume() {
        super.onResume()
            checkForVersionUpdate()
    }


    private fun checkForVersionUpdate() {
            appUpdateManager?.appUpdateInfo?.addOnSuccessListener { appUpdateInfo ->
                if ((appUpdateInfo.updateAvailability() …
Run Code Online (Sandbox Code Playgroud)

android android-app-bundle in-app-update

11
推荐指数
2
解决办法
3404
查看次数

使用Android App Bundle时,Crashlytics不再上传映射文件

运行Build -> Generate Signed Bundle / SDK
然后选择Android App Bundle

myApp.aab使用Play商店签名功能生成新文件.以及常规映射文件myApp/outputs/mapping/release/mapping.txt

出于某种原因,Crashalityics无法选择那些.
有没有办法手动触发Crashlytics的上传过程?

经过测试

  • Gradle build:3.2.1
  • Crashlytics:2.9.8
  • io.fabric.tools:gradle:1.+
  • Android Studio 3.2.1(Windows)

android proguard crashlytics android-app-bundle

10
推荐指数
1
解决办法
876
查看次数

Android动态功能模块,找不到资源

我在发布到 Play 商店时在下载的功能模块中启动活动时遇到问题。它总是在下载的模块活动中的 setContentView() 上崩溃。

java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx/xxxActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7e080000
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7e080000
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:227)
    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2149)
    at android.content.res.Resources.getLayout(Resources.java:1158)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
Run Code Online (Sandbox Code Playgroud)

真正奇怪的部分是,如果我发布应用程序的新版本(唯一的变化是 versionCode)来播放商店和更新应用程序,一切正常。

当我卸载应用程序并再次安装时,崩溃又回来了。

我的应用程序继承了 SplitCompatApplication() 并且只是为了确保我已经尝试添加:

override fun attachBaseContext(newBase: Context?) {
        super.attachBaseContext(newBase)
        SplitCompat.install(this)
    }
Run Code Online (Sandbox Code Playgroud)

到功能模块中的活动并禁用 proguard 以确保在缩小期间没有删除任何内容

我的 SplitInstallStateUpdatedListener

private val listener = SplitInstallStateUpdatedListener { state ->
        val multiInstall = state.moduleNames().size > 1
        state.moduleNames().forEach { name ->
            // Handle changes in state.
            when (state.status()) { …
Run Code Online (Sandbox Code Playgroud)

android android-module android-app-bundle

10
推荐指数
2
解决办法
3115
查看次数