Cordova plugin Cache problem

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

2019-08-29 · 1 min · 19 words · Me

Error: Current working directory is not a Cordova-based project.

https://github.com/driftyco/ionic-cli/issues/935 just put www directory on root 以下是把這則 2017 年筆記展開的完整說明。 這個錯誤在說什麼 2016–2017 年用 Ionic 2 開發 App 時,執行: ionic platform add android 卻噴出: Error: Current working directory is not a Cordova-based project. 最玄的地方是:config.xml 明明就在專案目錄裡,直接跑 cordova platform add android 也正常,偏偏 Ionic CLI 就是說這不是 Cordova 專案。 原因在於:Cordova(以及包著它的 Ionic CLI)判斷「目前目錄是不是 Cordova 專案」的條件,是目錄裡必須同時存在 config.xml 和 www/ 目錄,缺一個就會報這個錯。維護者在 issue #935 結案時還補充:這兩個必須是真實檔案(不能是壞掉的 symlink),權限也要能正常讀寫。 筆記裡連結的 driftyco 是 Ionic 團隊以前的 GitHub 組織名(現為 ionic-team),連結會自動轉址到同一個 issue。 最常見的兇手:www/ 目錄不存在 www/ 是前端 build 產生的結果,很多專案範本會把它放進 .gitignore。於是: ...

2017-02-10 · 2 min · 241 words · Me

cordova framework7 base

index.html APP ========== index.js for cordova my-app.js for framework7

2016-07-02 · 1 min · 9 words · Me

Crodova build release apk windows

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.apk platforms\android\build\outputs\apk\project_name.apk ...

2016-06-23 · 1 min · 78 words · Me

Cordova android framework7 回上一頁

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’); }

2016-06-23 · 1 min · 21 words · Me

Cordova android AdMob framework7

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’, interstitial: ‘ca-app-pub-xxxxxxxxxxxxx/oooooooooooo’ }; } if (! AdMob ) { alert( ‘admob plugin not ready’ ); return; } // this will create a banner on startup AdMob.createBanner( { adId: admobid.banner, adSize: ‘SMART_BANNER’, position: AdMob.AD_POSITION.BOTTOM_CENTER, isTesting: true, // TODO: remove this line when release overlap: false, offsetTopBar: false, bgColor: ‘black’ } ); this will load a full screen ad on startup AdMob.prepareInterstitial({ adId: admobid.interstitial, isTesting: true, // TODO: remove this line when release autoShow: true }); app.receivedEvent(‘deviceready’); } ...

2016-06-22 · 1 min · 160 words · Me