eclipse 打包 apk 文件

1.通过eclipse中的file ,点击Import 导入项目

2.选择Android 中的 Existing Android Code Into Workspace

3.通过 Brower 引入项目

4.勾选 platforms\android 和 platforms\android\CordovaLib

5.通过file ,点击 Export 开始打包

6.选择Android 中的 Export Android Application

7.通过 Browser 选择打包的项目 (MainActivity)

8.选择或设置 keystore 选择保存地址 并 设置密码

9.设置 Aliaas , Password , Confirm , Validity(years) 25年 ,First and Last Name

10.设置储存位置 设置文件名


遇到的坑:

1.no emulator images (avds) found 找不到模拟器镜像

重新设置 window - Android Virtual Devices (AVD) Manager

2.设置apk 的 桌面图标

修改名称 项目名 -- res -- value -- string.xml -- 修改app_name

修改图标 configure launcher icon

首先,在Eclipse中某个android项目上右击打开 New - Other 视图,

打开Android 文件夹,其中有一个 Android Icon Set 选项,

点击Foreground 中的 Image 按钮 ,选择图片 ,点击Finish

修改 项目名称 下的 AndroidManifest.xml中 android:icon

android:icon="@drawable/ic_launcher" //ic_launcher这个图标改下就可以改图标

3.设置 apk 的 启动画面

打开 src 文件夹 打开文件 SplashScreen.java

查询 onDestroy()

firstShow = true;

注:默认是被注释掉的,表示只是第一次启动时才显示启动画面,我们只需取消注释后再重新编译后,每次启动都会有启动画面了

使用 cordvoa 插件 修改启动页 图片 ==》 cordova plugin add cordova-plugin-splashscreen


注:重置 eclipse ===>> Window-->Perspective-->Reset Perspective

或 清除根目录下的项目文件(简单粗暴)

 

4.热更新(在线更新)

 

5.注:1.复制 根路径 下的splash文件 及 icon 文件,并粘贴 到 platforms -- android -- res 中(替换)

2.gulp 压缩js 文件 删除多余文件,修改index.html 上的路径 及 platforms -- android -- assets --

www 下的对应配置

3.eclipse 修改图标(@drawable/ic_launcher)

new -- other -- AndroidManifest.xml -- android:icon -- @drawable/ic_launcher

转载于:https://www.cnblogs.com/crazycode2/p/6260508.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值