Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未在Phonegap应用程序(Android)中创建SQLite数据库_Android_Sqlite_Cordova - Fatal编程技术网

未在Phonegap应用程序(Android)中创建SQLite数据库

未在Phonegap应用程序(Android)中创建SQLite数据库,android,sqlite,cordova,Android,Sqlite,Cordova,当我在Safari(桌面)或虚拟设备中测试我的应用程序时,我可以看到数据库是按预期创建的,但如果我在物理设备(galaxy Notes选项卡)上运行相同的应用程序,我可以看到DDMS文件资源管理器中的/data文件夹为空,并且我找不到数据库 我正在尝试在onDeviceReady函数中创建数据库,我可以看到它正在按预期启动 我是否需要此设备的root访问权限?我检查过了,它没有根吗 以下是我的config.xml: <?xml version="1.0" encoding="UTF-8"?

当我在Safari(桌面)或虚拟设备中测试我的应用程序时,我可以看到数据库是按预期创建的,但如果我在物理设备(galaxy Notes选项卡)上运行相同的应用程序,我可以看到DDMS文件资源管理器中的/data文件夹为空,并且我找不到数据库

我正在尝试在onDeviceReady函数中创建数据库,我可以看到它正在按预期启动

我是否需要此设备的root访问权限?我检查过了,它没有根吗

以下是我的config.xml:

<?xml version="1.0" encoding="UTF-8"?>

<widget xmlns = "http://www.w3.org/ns/widgets"
    xmlns:gap = "http://phonegap.com/ns/1.0"
    id = "uk.co.epwin.ecobuild2013"
    version = "0.0.1"
    versionCode = "1">

<name>Ecobuild 2013</name>

<description>
app for the 2013 Ecobuild exhibition
</description>

<author href="http://www.epwin.co.uk" email="info@epwin.co.uk">
    Mike Mardon | Epwin Group Design Studio
</author>

<!-- ICONS -->
<icon src="images/icons/icon.png" /> <!-- default 72 pixels -->
<icon src="images/icons/ios/icon.png" width="57" height="57" /> <!-- iPhone 3G, iPhone 3GS, iPod Touch 2G, 3G -->
<icon src="images/icons/ios/icon72.png" gap:platform="ios" width="72" height="72" /> <!-- iPad, iPad 2, iPad mini -->
<icon src="images/icons/ios/icon114.png" width="114" height="114" /> <!-- iPhone 4, iPhone 4S, iPod Touch 4G -->
<icon src="images/icons/ios/icon144.png" width="144" height="144" /> <!-- iPad 3, iPad 4 -->
<icon src="images/icons/android/ldpi.png" gap:platform="android" gap:density="ldpi" /> <!-- 36 pixels -->
<icon src="images/icons/android/mdpi.png" gap:platform="android" gap:density="mdpi" /> <!-- 48 pixels -->
<icon src="images/icons/android/hdpi.png" gap:platform="android" gap:density="hdpi" /> <!-- 72 pixels -->
<icon src="images/icons/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" /> <!-- 96 pixels -->
<icon src="images/icons/bb/icon.png" gap:platform="blackberry" /> <!-- 72 pixels -->
<icon src="images/icons/bb/icon_hover.png" gap:platform="blackberry" gap:state="hover"/> <!-- 72 pixels -->
<icon src="images/icons/winphone/icon.png" gap:platform="winphone" /> <!-- 57 pixels -->
<icon src="images/icons/winphone/tileicon.png" gap:platform="winphone" gap:role="background" /> <!-- 72 pixels -->
<icon src="images/icons/webos/icon.png" gap:platform="webos" /> <!-- 29 pixels -->
<icon src="images/icons/webos/miniicon.png" gap:platform="webos" gap:role="mini" /> <!-- 15 pixels -->

<!-- SPLASH SCREENS -->
<gap:splash src="images/splash/splash.png" /> <!-- default 320x480 pixels -->
<gap:splash src="images/splash/ios/1024x768.png" width="1024" height="768" /> <!-- iPad 1, iPad 2, iPad mini -->
<gap:splash src="images/splash/ios/768x1024.png" width="768" height="1024" /> <!-- iPad 1, iPad 2, iPad mini -->
<gap:splash src="images/splash/ios/320x480.png" width="320" height="480" /> <!-- iPh 3G / 3GS, iPod Touch 2, iPod Touch 3 -->
<gap:splash src="images/splash/ios/640x960.png" width="640" height="960" /> <!-- iPhone 4, iPhone 4S, iPod Touch 4 -->
<gap:splash src="images/splash/ios/640x1136.png" width="640" height="1136" /> <!-- iPhone 5, iPod Touch 5 -->
<gap:splash src="images/splash/android/ldpi.png" gap:platform="android" gap:density="ldpi" /> <!-- 200x320 -->
<gap:splash src="images/splash/android/mdpi.png" gap:platform="android" gap:density="mdpi" /> <!-- 320x480 -->
<gap:splash src="images/splash/android/hdpi.png" gap:platform="android" gap:density="hdpi" /> <!-- 480x800 -->
<gap:splash src="images/splash/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" /> <!-- 720x1280 -->
<gap:splash src="images/splash/bb/splash.png" gap:platform="blackberry" /> <!-- BlackBerry 250x250 -->
<gap:splash src="images/splash/winphone/splash.jpg" gap:platform="winphone" /> <!-- Windows Phone 7 480x800 -->
<gap:splash src="images/splash/webos/splash.png" gap:platform="webos" /> <!-- WebOS 64x64 -->

<!-- GENERAL PREFERENCES -->
<!--<preference name="phonegap-version" value="2.2.0" /> if unspecified it will build with latest version--> 
<preference name="orientation" value="landscape" /> 
<preference name="target-device" value="universal" /> <!-- handset, tablet only applies to ios, other are universal -->
<preference name="fullscreen" value="true" /> 

<!-- iOS PREFERENCES -->
<preference name="webviewbounce" value="false" /> <!-- if screen "bounces" when scrolled beyond top or bottom on iOS -->
<preference name="prerendered-icon" value="true" />  <!-- if true, iOS won't apply its gloss to app's home screen icon -->
<preference name="stay-in-webview" value="false" /> <!-- if true, all links (even with target blank) will open in webview -->
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="exit-on-suspend" value="true" /> <!-- if set to false, app will continue to run on suspend -->
<preference name="show-splash-screen-spinner" value="true" /> <!-- show spinner on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- if false, it must be hidden using a JavaScript API -->

<!-- ANDROID PREFERENCES -->
<preference name="android-minSdkVersion" value="7" /> <!-- min Android 2.1 -->
<!-- <preference name="android-maxSdkVersion" value="17" /> max Android 4.2 -->
<preference name="android-installLocation" value="auto" /> <!-- internalOnly, auto or preferExternal -->
<preference name="splash-screen-duration" value="5000" /> <!-- 5 seconds  - for auto-hide behaviour call    navigator.splashscreen.hide(); in the device-ready method-->        
<preference name="load-url-timeout" value="20000" /> <!-- 20 seconds -->
<plugin name="Storage" value="org.apache.cordova.Storage" />

<!-- BLACKBERRY PREFERENCES -->
<preference name="disable-cursor" value="false" />

<!-- PHONEGAP API FEATURES PREFERENCES -->
<preference name="permissions" value="none"/>

<!-- If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
<preference name="permissions" value="none"/> -->

<!-- to enable individual permissions use the following examples -->
<!--<feature name="http://api.phonegap.com/1.0/battery"/>-->
<!--<feature name="http://api.phonegap.com/1.0/camera"/>-->
<!--<feature name="http://api.phonegap.com/1.0/contacts"/>-->
<feature name="http://api.phonegap.com/1.0/file"/>
<!--<feature name="http://api.phonegap.com/1.0/geolocation"/>-->
<!--<feature name="http://api.phonegap.com/1.0/media"/>-->
<!--<feature name="http://api.phonegap.com/1.0/network"/>-->
<!--<feature name="http://api.phonegap.com/1.0/notification"/>-->

2013年生态建筑
2013年生态建筑展览会应用程序
迈克·马登(Mike Mardon | Epwin Group Design Studio)

您确实需要一个根设备来展开文件资源管理器上的
数据
文件夹。它看起来是空的,但不是


如果它可以在avd上工作,那么它也应该可以在设备上工作,您就是无法访问文件资源管理器上的数据库文件

抱歉重申,我的AVDthanks确实可以做到这一点,我想后续的测试也会证实你的回答!