2014-02-13 78 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

相关问题