2016-05-31 122 views
1

我GOOLGE上進行搜索後我在使用SQLite數據庫的移動應用新的配置我在Visual Studio項目,但之後我收到兩條錯誤enter image description here缺少EXEC:SQLitePlugin.open在Apache的科爾多瓦與Visual Studio 2015年

點擊成功獲得第二個錯誤

enter image description here

我搜索後,我沒有得到任何解決方案。

我包括我的html頁面和代碼源碼SQLitePlugin.js是

(function() { 
"use strict"; 

document.addEventListener('deviceready', onDeviceReady.bind(this), false); 

function onDeviceReady() { 
    var db = window.sqlitePlugin.openDatabase({ name: 'my.db', location: 'default' }, function (db) { 

     // Here, you might create or open the table. 
     db.executeSql('CREATE TABLE customerAccounts (firstname, lastname, acctNo)'); 

    }, function (error) { 
     console.log('Open database ERROR: ' + JSON.stringify(error)); 
    }); 


    // Handle the Cordova pause and resume events 
    document.addEventListener('pause', onPause.bind(this), false); 
    document.addEventListener('resume', onResume.bind(this), false); 

    // TODO: Cordova has been loaded. Perform any initialization that requires Cordova here. 
    var element = document.getElementById("deviceready"); 
    element.innerHTML = 'Device Ready'; 
    element.className += ' ready'; 
}; 

function onPause() { 
    // TODO: This application has been suspended. Save application state here. 
}; 

function onResume() { 
    // TODO: This application has been reactivated. Restore application state here. 
}; 

})();

這裏的錯誤是什麼?

回答

2

當您調用window.sqlitePlugin.openDatabase時,SQLite插件將執行Ripple不支持的Java本地代碼。 從這個document

注意:波動不提供科爾多瓦API或本地設備功能(插件)的完整模擬。它也不會模擬特定平臺的特定瀏覽器版本。您可以通過在實際設備或仿真器上進行測試來實現此目的。

請嘗試通過Android模擬器或真實設備。

相關問題