https://stackoverflow.com/questions/26481507/how-to-force-cordova-to-recompile-added-plugins
Cordova plugin會cache
https://stackoverflow.com/questions/26481507/how-to-force-cordova-to-recompile-added-plugins
1、先remove
2、再加回
為了以上動作執行確實,不要直接去改plugin內容,採用下例方式:
1、建立 keep_plugs
2、將plugin放到裡面,然後再add到專案
3、修改後,重新執行remove、add
cordova plugin remove cordova-android-toast
cordova plugin add keep_plugs/cordova-android-toast
index.html
APP ==========
index.js for cordova
my-app.js for framework7
c:\cordova_project
c:\cordova_project\project_name
c:\cordova_project\Crodova build release apk1.bat
c:\cordova_project\Crodova build release apk2.bat
c:\cordova_project\Crodova build release apk3.bat
c:\cordova_project\zipalign.exe
.Crodova build release apk1.bat
cd project_name
cordova build –release android
.Crodova build release apk2.bat
ECHO off
set /p storepass=input storepass :
set /p keypass=input keypass :
cd project_name
set PATH=%PATH%;C:\“Program Files”\Java\jdk1.8.0_74\bin\
jarsigner -verbose -keystore ../keystore/eexcel.keystore -storepass %storepass% -keypass %keypass% platforms/android/build/outputs/apk/android-release-unsigned.apk alias_name
.Crodova build release apk3.bat
cd project_name
del /f /q platforms/android/build/outputs/apk/project_name.apk
%cd%\..\zipalign -f -v 4 platforms\android\build\outputs\apk\android-release-unsigned.
https://muut.com/framework7-cn#!/?%E8%BF%94%E5%9B%9E%E4%B8%8A%E4%B8%80%E9%A1%B5
onDeviceReady: function() {
document.addEventListener(“backbutton”, function(e) {
var currentView = myApp.getCurrentView();
if(currentView.history.length>1) {
currentView.router.back({});//返回上一级
}else{
navigator.app.exitApp();//首页点返回键退出
}
}, false);
app.receivedEvent(‘deviceready’);
}
cordova create oooxxxx
see js/index.js
onDeviceReady: function() {
app.receivedEvent(‘deviceready’);
}
Now put AdMob Code
onDeviceReady: function() {
// place our admob ad unit id here
var admobid = {};
if( /(android)/i.test(navigator.userAgent) ) {
admobid = { // for Android
banner: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’,
interstitial: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’
};
} else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
admobid = { // for iOS
banner: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’,
interstitial: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’
};
} else {
admobid = { // for Windows Phone
banner: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’,