Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
190 views
in Technique[技术] by (71.8m points)

javascript - build:android和build:android -t apk有什么区别?(What is the difference between build:android and build:android -t apk?)

I'm trying to publish an app, and the docs say,

(我正在尝试发布一个应用,而文档说,)

# Start the build:
Run expo build:android or expo build:ios

Literally on the next line, without any explanation it says,

(从字面上看,下一行没有任何解释,)

# If you choose to build for Android
When building for android you can choose to build APK (expo build:android -t apk)

No where does it explain the difference.

(没有在哪里解释差异。)

Which should I use when I want to build an android app for the Google Play Store?

(当我想为Google Play商店构建Android应用程序时应该使用哪个?)

  ask by Mike K translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

From the documentation :

(从文档中 :)

When building for android you can choose to build APK (expo build:android -t apk) or Android App Bundle (expo build:android -t app-bundle).

(为Android构建时,您可以选择构建APK(expo构建:android -t apk)或Android App Bundle(expo内部构建:android -t app-bundle)。)

App bundles are recommended, but you have to make sure the Google Play App Signing is enabled for your project, you can read more about it here

(建议使用应用程序捆绑包,但是您必须确保为项目启用了Google Play应用程序签名,您可以在此处了解更多信息)

I am guessing the -t signifies something internally for Expo as you can see it also is being used for the app-bundle variant and the apk (and also for iOS builds).

(我猜-t表示Expo内部有一些东西,因为您可以看到它也被用于app-bundle变体和apk(以及iOS版本)。)

Depending on what you want, either use:

(根据您的需求,使用:)

  • expo build:android -t apk

or

(要么)

  • expo build:android -t app-bundle

To read more about Application Bundles, go here

(要了解有关应用程序捆绑的更多信息,请转到此处)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...