简体   繁体   English

如何在发布模式下构建 Android 应用程序? GoogleFit:RESULT_CANCELED

[英]How to build Android app in release mode? GoogleFit: RESULT_CANCELED

Can anyone tell me how to build my app in release mode?谁能告诉我如何在发布模式下构建我的应用程序? I'm having issues getting to the permissions screen on my android (java) application, I keep getting GoogleFit: RESULT_CANCELED error and then activity closes.我在访问 android (java) 应用程序的权限屏幕时遇到问题,我不断收到GoogleFit: RESULT_CANCELED错误,然后活动关闭。

Another user suggested building in release mode, my SDK is generated for release and I have updated my gradle files but nothing is working.另一个用户建议在发布模式下构建,我的 SDK 是为发布而生成的,我已经更新了我的 gradle 文件,但没有任何效果。

I have asked for help a few times since yesterday with no luck so if anyone can help that would be appreciated!自昨天以来,我已经多次寻求帮助,但没有运气,所以如果有人能提供帮助,将不胜感激!

Link to my other question with problem in detail 详细链接到我的其他问题

If you sre using Android Studio then you can go to build > Build Signed Bundle/APK....proceed and at the end Mark "release".如果您使用 Android Studio,那么您可以 go 构建 > 构建签名包/APK....继续并在最后标记“发布”。

For more details you can search "android studio Generation Signet APK".有关更多详细信息,您可以搜索“android studio Generation Signet APK”。 But I believe your problems lie deeper than that, I dont think it has anything to do with how you build your APK.但我相信你的问题比这更深,我认为这与你如何构建你的 APK 没有任何关系。

I'm assuming you are using Android studio.我假设您使用的是 Android 工作室。 To build the app in release mode.在发布模式下构建应用程序。 You will need to find a window called Build Variants which should be at the lower left screen of you workspace.您将需要找到一个名为Build Variants的 window,它应该位于您工作区的左下方屏幕。 And you will see the modules you created for your APP.您将看到为您的 APP 创建的模块。 And just change Build Variants from debug to release .只需将Build Variantsdebug更改为release

Here is the official document link for your reference Build and Run your App.这是官方文档链接,供您参考构建并运行您的应用程序。

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

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