quasar 安卓端打包,解决gradle下载失败的问题

核心的问题是网络不好下载gradle6.5下来不回来

解决办法是使用grep命令查找url,使用sed命令替换下载地址 

quasar mode add cordova
cd src-cordova
cordova platform add android
cordova requirements
 
cordova plugin add cordova-plugin-ionic-webview
 
cordova plugin add cordova-plugin-wkwebview-engine
 
cd ../
 
quasar dev -m cordova -T android
 
quasar dev -m android --ide
 
quasar build -m android
 
quasar build -m cordova -T android
 
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 20000
 
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore ./app-release-unsigned.apk alias_name


quasar mode add electron
quasar build -m electron

quasar build -m electron -- --no-sandbox --disable-setuid-sandbox

 

grep -r "services.gradle.org" *

 
https://www.cc-admin.top/distributions/gradle-6.5-all.zip

sed -i 's/services.gradle.org/www.cc-admin.top/g' src-cordova/node_modules/cordova-android/bin/templates/cordova/lib/builders/ProjectBuilder.js

sed -i 's/services.gradle.org/www.cc-admin.top/g' src-cordova/node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties
sed -i 's/services.gradle.org/www.cc-admin.top/g' src-cordova/platforms/android/cordova/lib/builders/ProjectBuilder.js
sed -i 's/services.gradle.org/www.cc-admin.top/g' src-cordova/platforms/android/gradle/wrapper/gradle-wrapper.properties


你可能感兴趣的:(android)