2017-11-07 7 views
0

を使用して:不正なconfig.xmlにPhoneGapのは、私が含まれている場合はAdobe ColdFusion Builderの2016年に</p> <p>を使用して構築する生成しようとPhoneGapのと<application>タグ

<application android:label="@string/app_name" > 
    <activity android:name="IntentTest" 
       android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
<intent-filter><action android:name="android.intent.action.VIEW"></action> 
<category android:name="android.intent.category.DEFAULT"></category> 
<category android:name="android.intent.category.BROWSABLE"></category> 
<data android:host="www.youtube.com" android:scheme="http"></data> 
</intent-filter> 

     </activity> 

<activity android:name="org.apache.cordova.DroidGap" 
android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
<intent-filter></intent-filter> 

</activity> 

</application> 

私はbuild.phonegap.com

で、このエラーを取得します

エラー - 不正な形式のconfig.xml - ここでこれを修正できます。

私は他の<application>タグと同じ結果を試しました。上記文献に

+0

に含まれていましたアプリケーションタグ? –

+0

私は外部のパーサーを介してそれを実行し、より良いメッセージを表示するかどうかを確認します –

+0

最後のタグを表示するコードを編集しました。 –

答えて

0

Phonegap docs

は、PhoneGapの上のXML解析からコードを免除する方法について説明します。

あなたは、config-file要素(ベータ版)を介してAndroidマニフェストとiOSプロパティリスト>ファイルにxmlを直接投稿できます。

Androidの場合は、これをヘッダーに含める必要があります。コードに続い

<widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = 
"http://phonegap.com/ns/1.0" xmlns:android = 
"http://schemas.android.com/apk/res/android" id = "com.yourapp" 
version = "1.0.0"> 

<config-file platform="android" parent="./application" mode="add"> 


    <application android:label="@string/app_name" > 
    <activity android:name="IntentTest" 
       android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
<intent-filter><action android:name="android.intent.action.VIEW"></action> 
<category android:name="android.intent.category.DEFAULT"></category> 
<category android:name="android.intent.category.BROWSABLE"></category> 
<data android:host="www.youtube.com" android:scheme="http"></data> 
</intent-filter> 

     </activity> 

<activity android:name="org.apache.cordova.DroidGap" 
android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden"> 
<intent-filter></intent-filter> 

    </activity> 

    </application> 

    </config-file> 

Iはbuild.phonegap.comでビルドを生成する場合、タグと関連するすべてのコードの端部であるAndroidManifold.xml

関連する問題

 関連する問題