Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hel-guide
app
Commits
b83797f4
Commit
b83797f4
authored
Aug 17, 2017
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track 1 files into repository.
- modified ionic/android.md Auto commit by GitBook Editor
parent
452cd283
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
44 deletions
+44
-44
android.md
ionic/android.md
+44
-44
No files found.
ionic/android.md
View file @
b83797f4
### I. Android打包步骤
*
1)进入工程目录,更新代码,修改baseConfig参数,执行
`gulp build-dev`
命令
![](/picture/android_apk1.png)
*
2)为了更新代码和插件,重新添加android平台,执行下列命令:
*
1.
`cordova platform rm android`
//删除安卓平台
*
2.
`cordova platform add android`
//添加安卓平台
![](/picture/android_apk.png)
*
3)开始执行android打包命令(开发调试时只需要打debug包)
*
`cordova build android`
//执行打包apk
!
[](
/picture/android_apk2.png
)
*
4)查看apk文件大小
![](/picture/android_apk_bug4.png)
### II.常见异常处理
*
1)首次打包时会遇到的问题
![](/picture/android_apk_bug.png)
*
2)解决异常步骤
*
1.执行
`cordova plugin --list`
//查看版本号
!
[](
/picture/android_apk_bug1.png
)
*
2.执行
`cordova plugin rm cordova-plugin-crosswalk-webview`
//移除插件
!
[](
/picture/android_apk_bug2.png
)
*
3.
`cordova plugin add cordova-plugin-crosswalk-webview@1.8.0 `
//重新添加
!
[](
/picture/android_apk_bug3.png
)
*
4.重新执行下列命令:
*
1.
`cordova platform rm android`
//删除安卓平台
*
2.
`cordova platform add android`
//添加安卓平台
*
3.
`cordova build android`
//执行打包apk
*
5.查看文件大小,确认是否打包成功。
### I. Android打包步骤
*
1)进入工程目录,更新代码,修改baseConfig参数,执行
`gulp build-dev`
命令
!
[](
/picture/android_apk1.png
)
*
2)为了更新代码和插件,重新添加android平台,执行下列命令:
*
1.
`cordova platform rm android`
//删除安卓平台
*
2.
`cordova platform add android`
//添加安卓平台
!
[](
/picture/android_apk.png
)
*
3)开始执行android打包命令(开发调试时只需要打debug包)
*
`cordova build android`
//执行打包apk
!
[](
/picture/android_apk2.png
)
*
4)查看apk文件大小
!
[](
/picture/android_apk_bug4.png
)
### II.常见异常处理
*
1)首次打包时会遇到的问题
!
[](
/picture/android_apk_bug.png
)
*
2)解决异常步骤
*
1.执行
`cordova plugin --list`
//查看版本号
!
[](
/picture/android_apk_bug1.png
)
*
2.执行
`cordova plugin rm cordova-plugin-crosswalk-webview`
//移除插件
!
[](
/picture/android_apk_bug2.png
)
*
3.
`cordova plugin add cordova-plugin-crosswalk-webview@1.8.0 `
//重新添加
!
[](
/picture/android_apk_bug3.png
)
*
4.重新执行下列命令:
*
1.
`cordova platform rm android`
//删除安卓平台
*
2.
`cordova platform add android`
//添加安卓平台
*
3.
`cordova build android`
//执行打包apk
*
5.查看文件大小,确认是否打包成功。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment