uni-App quickly develops an Android application
The development tools and SDKs that will be used in this issue:
1,[HBuilderX][https://www.dcloud.io/] 2,[Android Studio][http://www.android-studio.org/] 3,[Android SDK][https://nativesupport.dcloud.net.cn/UniMPDocs/SDKDownload/android]
步骤1:
将上期创建的项目,用HBuilderX打开,运行到浏览器看效果,编写代码,再本地打包,HBuilderX部分操作完成
步骤2:
下载Android SDK,因SDK版本更新太快,每个版本需要改动的较大。故不提供图片做为参考
步骤3:
用Android Studio打开SDK实例demo,Android Studio会自动下载依赖,可以真机调测,或build出正式版
步骤4:
将HBuilderX打包出来的文件,复制到实例demo的\app\src\main\assets\apps目录下
4.1,文件名改为实例demo的文件名
4.2,manifest.json中的“id"改为实例的”id“
步骤5:
此时可以真机调试查看APP,亦可打包出正式版本;如需要做更多修改,则需要具备一定的Android开发能力
Such as adding map operations: Add permission and packageName key of meta-data in AndroidManifest.xml file
Stage summary:
1. Need to pay attention to the unification of id and the unification of package name
2. If you need to add a map operation, the location service and maps service in the module configuration of uniapp and fill in the third-party key applied for