首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >react本地Gradlew不创建app.aab

react本地Gradlew不创建app.aab
EN

Stack Overflow用户
提问于 2019-06-11 05:56:20
回答 3查看 6.5K关注 0票数 5

系统信息

  1. 反应-原生: 0.59.8
  2. 安卓-工作室: 3.3.1

背景

我在做简单的反应-本地应用程序。我试着把我的应用程序上传到Google商店,但是失败了。我跟踪了这份文件。正如上面说的,我在终端上输入了./gradlew buildRelease。结果在下面。

代码语言:javascript
复制
> Configure project :react-native-voice
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, /Users/mac88/Desktop/Projects/voice-car-v2/NativeApp/android/app/build/generated/assets/react/release/index.android.bundle
info Done writing bundle output
info Copying 13 asset files
info Done copying assets

> Task :react-native-gesture-handler:compileReleaseJavaWithJavac
Note: /Users/mac88/Desktop/Projects/voice-car-v2/NativeApp/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

BUILD SUCCESSFUL in 29s
63 actionable tasks: 10 executed, 53 up-to-date

问题

是的,它显示了BUILD SUCCESSFULL in 29s!但是没有android/app/build/outputs/bundle/release/app.aab或任何文件夹。

如何获取app.aab文件?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2019-06-11 06:42:05

当您使用./gradlew buildRelease生成android时,它会自动保存在您的项目android/app/build/outputs/apk/release文件夹中,如果apk生成成功,您可以找到app-release.apk

另一个选项是,当您使用android studio生成apk时,它会为您提供将apk保存在选定文件夹或目录中的选项。

谢谢

票数 6
EN

Stack Overflow用户

发布于 2020-01-30 23:20:04

如果您试图创建一个*.aab,您需要使用bundleRelease而不是buildRelease来创建您所期望的.aab。

票数 14
EN

Stack Overflow用户

发布于 2021-09-01 19:03:41

只需使用./gradlew bundleRelease

进程结束后,转到YOUR APP NAME/android/app/build/outputs/bundle/release

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56537333

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档