Phonegap构建与SQLLite相关的错误

时间:2016-07-28 15:06:15

标签: ios sqlite cordova phonegap-plugins phonegap-build

当我通过build.phonegap.com建立(之前正常)phongap应用程序时,IOS(仅)构建错误。 错误消息是"哦,geez。你的构建失败了。抱歉,构建服务器上出现问题"。

查看phonegap构建日志文件,错误在于:

(.. directory path here ..) /Plugins/io.litehelpers.cordova.sqlite/SQLitePlugin.m:15:9: fatal error: 'Cordova/NSData+Base64.h' file not found

#import <Cordova/NSData+Base64.h>

在phonegap构建服务器上看起来没有Cordova / NSData + Base64.h?我可能会错误地解释这一点。

在配置文件中,我们正在使用

<plugin name="io.litehelpers.cordova.sqlitestorage" spec="0.7.10" source="pgb" />

也试过这个以获得最新版本

<plugin name="io.litehelpers.cordova.sqlite"  source="pgb" />

这个

并且还添加了

<preference name="phonegap-version" value="cli-6.2.0" />

我收集6.3.0最近刚加入。

可悲的是,这并没有解决问题。

对此的任何帮助都将非常感激。如果需要更多信息,请告诉我。

由于 配置文件是

<?xml version="1.0"  encoding="UTF-8" standalone="yes"?>
<widget id="our.thing.changedforstackoverflow" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

    <name>Our Application</name>

    <description>
    mobile application.
    </description>

    <author email="xyz@this.com" href="htp://here@there.com">
    XYZ company
    </author>

    <content src="index.html"/>
    <access origin="*"/>
    <preference name="phonegap-version" value="cli-6.2.0" />
    <preference name="webviewbounce" value="false"/>
    <preference name="UIWebViewBounce" value="false"/>
    <preference name="DisallowOverscroll" value="true"/>
    <preference name="android-minSdkVersion" value="16"/>
    <preference name="BackupWebStorage" value="none"/>
    <preference name="ShowSplashScreen" value="false" />
    <preference name="SplashScreenDelay" value="3000" />

    <feature name="StatusBar">
        <param name="ios-package" value="CDVStatusBar" onload="true"/>
    </feature>

    <allow-navigation href="*"/>

    <plugin name="cordova-plugin-device" spec="~1.1.2" />
    <plugin name="cordova-plugin-console" spec="~1.0.3" />
    <plugin name="cordova-plugin-whitelist" spec="~1.2.2" />
    <plugin name="cordova-plugin-splashscreen" spec="~3.2.2" />
    <plugin name="cordova-plugin-statusbar" spec="~2.1.3" />
    <plugin name="io.litehelpers.cordova.sqlite"  source="pgb" />
    <plugin name="cordova-plugin-camera" spec="1.2.0" source="pgb" />
    <plugin name="cordova-plugin-network-information" spec="1.0.1" source="pgb" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.0" />

    <platform name="ios">
        <icon src="resources/ios/icons/Icon.png" width="57" height="57"/>
        <icon src="resources/ios/icons/Icon@2x.png" width="114" height="114"/>
        <icon src="resources/ios/icons/Icon-29.png" width="29" height="29"/>
        <icon src="resources/ios/icons/Icon-40.png" width="40" height="40"/>
        <icon src="resources/ios/icons/Icon-40@2x.png" width="80" height="80"/>
        <icon src="resources/ios/icons/Icon-50.png" width="50" height="50"/>
        <icon src="resources/ios/icons/Icon-58.png" width="58" height="58"/>
        <icon src="resources/ios/icons/Icon-60.png" width="60" height="60"/>
        <icon src="resources/ios/icons/Icon-72.png" width="72" height="72"/>
        <icon src="resources/ios/icons/Icon72@2x.png" width="144" height="144"/>
        <icon src="resources/ios/icons/Icon-76.png" width="76" height="76"/>
        <icon src="resources/ios/icons/Icon-80.png" width="80" height="80"/>
        <icon src="resources/ios/icons/Icon-100.png" width="100" height="100"/>
        <icon src="resources/ios/icons/Icon-120.png" width="120" height="120"/>
        <icon src="resources/ios/icons/Icon-152.png" width="152" height="152"/>
        <icon src="resources/ios/icons/Icon-180@3x.png" width="180" height="180"/>
        <splash src="resources/ios/splash/Default.png" height="1004" width="768"/>
        <splash src="resources/ios/splash/Default@2x~iphone_640x960.png" height="960" width="640"/>
        <splash src="resources/ios/splash/Default~ipad.png" height="2008" width="1536"/>
        <splash src="resources/ios/splash/Default~iphone.png" height="480" width="320"/>
        <splash src="resources/ios/splash/Default-568h@2x~iphone_640x1136.png" height="1136" width="640"/>
        <splash src="resources/ios/splash/Default-750@2x~iphone6-landscape_1334x750.png" height="750" width="1334"/>
        <splash src="resources/ios/splash/Default-750@2x~iphone6-portrait_750x1334.png" height="1334" width="750"/>
        <splash src="resources/ios/splash/Default-1242@3x~iphone6s-landscape_2208x1242.png" height="1242" width="2208"/>
        <splash src="resources/ios/splash/Default-1242@3x~iphone6s-portrait_1242x2208.png" height="2208" width="1242"/>
        <splash src="resources/ios/splash/Default-Landscape@2x~ipad_2048x1496.png" height="1496" width="2048"/>
        <splash src="resources/ios/splash/Default-Landscape@2x~ipad_2048x1536.png" height="1536" width="2048"/>
        <splash src="resources/ios/splash/Default-Landscape~ipad_1024x748.png" height="748" width="1024"/>
        <splash src="resources/ios/splash/Default-Landscape~ipad_1024x768.png" height="768" width="1024"/>
        <splash src="resources/ios/splash/Default-Portrait@2x~ipad_1536x2008.png" height="2008" width="1536"/>
        <splash src="resources/ios/splash/Default-Portrait@2x~ipad_1536x2048.png" height="2048" width="1536"/>
        <splash src="resources/ios/splash/Default-Portrait~ipad_768x1024.png" height="1024" width="768"/>
    </platform>

    <platform name="android">
        <icon src="resources/android/drawable-hdpi/icon.png" density="ldpi"/>
        <icon src="resources/android/drawable-ldpi/icon.png" density="ldpi"/>
        <icon src="resources/android/drawable-mdpi/icon.png" density="mdpi"/>
        <icon src="resources/android/drawable-xhdpi/icon.png" density="xhdpi"/>
        <icon src="resources/android/drawable-xxhdpi/icon.png" density="xxhdpi"/>
        <icon src="resources/android/drawable-xxxhdpi/icon.png" density="xxxhdpi"/>
        <splash src="resources/android/drawable-land-hdpi/screen.png" density="land-hdpi"/>
        <splash src="resources/android/drawable-land-ldpi/screen.png" density="land-ldpi"/>
        <splash src="resources/android/drawable-land-mdpi/screen.png" density="land-mdpi"/>
        <splash src="resources/android/drawable-land-xhdpi/screen.png" density="land-xhdpi"/>
        <splash src="resources/android/drawable-land-xxhdpi/screen.png" density="land-xxhdpi"/>
        <splash src="resources/android/drawable-land-xxxhdpi/screen.png" density="land-xxxhdpi"/>
    </platform>

</widget>

1 个答案:

答案 0 :(得分:2)

继续使用旧插件并不是一个好习惯。你应该使用latest version?但由于该版本不再支持PhoneGap Build,因此请使用他们的recommended alternative。阅读 BREAKING CHANGE 部分,看看您的代码是否需要进行任何修改并给它一个旋转。

从此更改config.xml

<plugin name="io.litehelpers.cordova.sqlite"  source="pgb" />

到这个

<plugin name="cordova-sqlite-evcore-extbuild-free"  spec="0.8.0" />