weex package apk steps

Configure android_home environment variable
configuration java_home variable
configuration adb path

Install node.js service

Step 1: Weex development framework
npm install weex-toolkit -g
Step 2: Weex package apk framework
npm install weexpack -g
Step 3:
cd \
Step 4: Create project
weex create dm
Step 5: Add Android framework
CD dm enter dm project directory
weex platform add android

Download the compressed package: gradle2.14.zip, copy the compressed package to: C: \ Users \ Administrator \ .gradle \ wrapper \ dists \ gradle-2.14.1-all \ 8bnwg5hd3w55iofp58khbp6yv directory
set the global path path: C: \ Program Files \ Java \ jdk1.8.0_131 \ bin
upgrade SDK: d: \ android-sdk_r24.4.1 -windows \ android-sdk_r24.4.1-windows \ android-sdk-windows
, double-click SDK Manager.exe
turn to platform tool 26, select all the numbers
Click Install for 26 tools- wait for the upgrade to finish

Install:
npm install weexpack -g

Step 6: Pack apk- remember to download: https://services.gradle.org/distributions/gradle-2.14.1-all.zip
weexpack build android

 

Step 7: Generate the key
keytool -genkey -alias file name.keystore -keyalg RSA -validity 1000 -keystore file name.keystore

Step 8: Sign
jarsigner -verbose -keystore file name.keystore -signedjar After signing.apk app-release-unsigned.apk file name.keystore

 

weex-ui help:
https://alibaba.github.io/weex-ui/#/cn/weex-ui-report


npm 报错 npm WARN lifecycle npm is using C:\Program Files\nodejs\node.exe but there is no node binary

Only this line of code is needed:

npm config set scripts-prepend-node-path true

 

Guess you like

Origin www.cnblogs.com/MrChen-/p/12692522.html