4

『UniApp』uni-app-打包成App - BNTang

 8 months ago
source link: https://www.cnblogs.com/BNTang/p/17936024.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

『UniApp』uni-app-打包成App - BNTang - 博客园

2105804-20231203182734954-1186032838.png

大家好,我是 BNTang, 在上一节文章中,我给大家详细的介绍了如何将我开发好的项目打包为微信小程序并且发布到微信小程序商店

趁热打铁,在来一篇文章,给大家详细的介绍如何将项目打包成APP。

打包 App 也是一样的,首先需要配置关于 App 应用的基础信息,打开 manifest.json

配置 App图标

2105804-20231223140057246-80028719.png

选择 App 图标配置,选择一张即可,下面的尺寸都是自动生成而来的(建议使用 1024 * 1024):

2105804-20231223141131775-1128084490.png

配置 App启动界面

如果你有启动页面,你就可以在这个配置项当中进行配置,没有就不用配了。

2105804-20231223155731563-1000312505.png

配置 App模块

如果你用到了模块当中的内容,勾选上,然后打包进去即可,没有用到就算了。

2105804-20231223155743947-1657395274.png

配置 App权限

就是看你应用 App 中的权限,比如说你项目中用到了蓝牙,读取通讯录等等,就在这个配置中勾选上对应的权限即可。

2105804-20231223155800546-848202707.png

配置 App常用其它设置

关于这个呢,我介绍里面的两个记好了,分别是 minSdkVersiontargetSdkVersion,这两个是必须要配置的,其他的可以不用管。

  • 那么这个怎么配置呢,在这个配置项的右侧有一个参考文档,点击进去
  • 你就会看到这个文档,详细的内容大家可以自己去看看

大概意思就是说支持的安卓版本,最低支持的版本是多少,最高支持的版本是多少,这个大家可以根据自己的项目需求进行配置。

2105804-20231223181023098-1698295373.png

我这里配置为 21 与 28,然后再将下面的支持CPU类型勾选一下:

2105804-20231223181157540-40034265.png

一般情况下只需要勾选前面两个就可以了,x86 是模拟器的,arm64-v8a 是真机的,如果你想要支持模拟器,那么就勾选上 x86

好了,大致就是这些,现在就可以点击发行了。

2105804-20231223181407136-47452624.png

2105804-20231223181533433-202231486.png

安装 App 云打包插件:

2105804-20231223181557503-1481638763.png

2105804-20231223181626154-1779928433.png

接下来的就是耐心等待,打包成功之后控制台会输出如下图信息:

2105804-20231223182156616-1881835007.png

点击打开所在目录,双击 .apk 文件就可以安装到模拟器当中:

2105804-20231223185907155-941848548.png

然后就可以双击这个程序运行起来:

2105804-20231223185927390-1416915722.png

或者找到工程目录中的 unpackage/release/apk

2105804-20231223182353433-2086194767.png

之后将这个文件发送给其它人进行安装即可。

  • 如果你有任何问题或建议,欢迎在下方留言,我会尽快回复
  • 如果你觉得本文对你有帮助,欢迎点赞、收藏,你的支持是我写作的最大动力

2105804-20231129232539490-1458223711.png

__EOF__

[ 授之以欲 受之以瑜 ]
This blog has running : 1255 d 11 h 38 m 36 s ღゝ◡╹)ノ♡

Copyright © 2023 BNTang Powered by .NET 8.0 on Kubernetes

Love Story - Taylor Swift
00:00 / 00:30

作词 : Taylor Swift

作曲 : Taylor Swift

We were both young when I first saw you (第一次见到你的时候我们都很年轻)

I close my eyes and the flashback starts (我闭上眼睛那一幕又闪现了)

I'm standing there (我站在那里)

On a balcony in summer air (在一个阳台上乘凉)

See the lights see the party the ball gowns (看着灯光,看着舞会和礼服)

See you make your way through the crowd (我看见你穿过拥挤的人群)

And say hello (向我打招呼问好)

Little did I know (而我还不知道)

That you were Romeo you were throwing pebbles (原来你就是罗密欧,你冲我扔小石子)

And my daddy said stay away from Juliet (我爸爸说:离朱丽叶远点)

And I was crying on the staircase (我在楼梯上哭泣)

Begging you please don't go (求你别离开)

And I said (我说)

Romeo take me somewhere we can be alone (罗密欧,带我去一个我们可以独处的地方)

I'll be waiting all there's left to do is run (我一直等待,现在唯一能做的就是逃离这里)

You'll be the prince and I'll be the princess (你会成为王子,我会成为公主)

It's a love story (这是个爱情故事)

Baby just say yes (亲爱的,只需答应我)

So I sneak out to the garden to see you (于是我偷偷地到花园去见你)

We keep quiet cause we're dead if they knew (我们保持安静因为被他们发现我们就死定了)

So close your eyes (所以闭上你的眼睛)

Escape this town for a little while (让我们暂时逃离这个小镇)

Cause you were Romeo I was the scarlet letter (因为你是罗密欧,我像红字中的女主角(和你有世仇不能在一起))

And my daddy said stay away from Juliet (我爸爸说:离朱丽叶远点)

But you were everything to me (但是你对我来说你就是我的全部)

I was begging you please don't go (我求你别离开)

And I said (我说)

Romeo take me somewhere we can be alone (罗密欧,带我去一个我们可以独处的地方)

I'll be waiting all there's left to do is run (我一直等待,现在唯一能做的就是逃离这里)

You'll be the prince and I'll be the princess (你会成为王子,我会成为公主)

It's a love story (这是个爱情故事)

Baby just say yes (亲爱的,只需答应我)

Romeo save me (罗密欧,救救我)

They try to tell me how to feel (他们尝试左右我的思想)

This love is difficult but it's real (这爱十分艰难 但它是真的)

Don't be afraid we'll make it out of this mess (不要担心,我们会走出困境)

It's a love story (这是个爱情故事)

Baby just say yes (亲爱的,只需答应我)

I got tired of waiting (我厌倦了等待)

Wondering if you were ever coming around (不知道你还会不会回来)

My faith in you was fading (我对你的信任开始消失)

When I met you on the outskirts of town (当我在郊外遇见你)

And I said (我说)

Romeo save me (罗密欧,救救我)

I've been feeling so alone (我感觉多么的孤单)

I keep waiting for you but you never come (我一直在等待,但你从没来过)

Is this in my head (这一直在我脑海里)

I don't know what to think (我不知道如何去思考)

He knelt to the ground and pulled out a ring (他跪在地上,并掏出一枚戒指)

And said (并说)

Marry me Juliet you'll never have to be alone (朱丽叶嫁给我,你再也不会孤单)

I love you and that's all I really know (我爱你,那是我非常确信的)

I talked to your dad (我已经和你爸爸谈过)

Go pick out a white dress (去挑选一件婚纱)

It's a love story (这是个爱情故事)

Baby just say yes (亲爱的,只需答应我)

Oh oh oh

Oh oh oh oh

'Cause we were both young when I first saw you (因为第一次见你的时候我们都很年轻)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK