2014-02-13 85 views
0

當我嘗試運行我的虛擬設備代碼時,我不斷收到錯誤消息「錯誤:解析XML時出錯:格式不正確」。我不知道問題是什麼。錯誤:解析XML時出錯:格式不正確?

<?xml version="0.03" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.testPro" 
    android:versionCode="0.03" 
    android:versionName="0.03" > 

    <uses-sdk 
     android:minSdkVersion="11" 
     android:targetSdkVersion="18" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@android:style/Theme.Black.NoTitleBar" > 
     > 
     <activity 
      android:name="com.example.candybird.MainActivity" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" 
      > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN"/> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 

回答

0

變化的0.03至1.0 <?xml version="1.0" encoding="utf-8"?>

android:versionCode,它必須是整數

變化爲0.03〜1 android:versionCode="1"

嘗試此

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.testPro" 
    android:versionCode="1" 
    android:versionName="0.03" > 

    <uses-sdk 
     android:minSdkVersion="11" 
     android:targetSdkVersion="18" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@android:style/Theme.Black.NoTitleBar" > 
     > 
     <activity 
      android:name="com.example.candybird.MainActivity" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" 
      > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN"/> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 
+0

試過,但仍然給我一個錯誤? – Emerrias

+0

@ user3304026我已更新我的答案 – Nambi

+0

這是行得通的,但由於某種原因,定位鎖定和橫幅移除不起作用? – Emerrias

相關問題