[英]android manifest is no well formed
Since i upgraded to ADT 20, i've been trying to create new Android project, but the same thing happen every time : The markup in the document preceding the root element must be well-formed. 自从我升级到ADT 20以来,我一直在尝试创建新的Android项目,但是每次都会发生同样的事情:root元素之前的文档中的标记必须格式正确。 And i've got another error in my main activity. 而且我的主要活动还有另一个错误。 R is not generated. 不生成R。
<<<<<<< Original <<<<<<<原始
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme">
</application>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme">
</application>
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Test"
android:label="@string/title_activity_test" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.testphonegap.MainActivity" />
</activity>
</application>
<application>
<activity android:name=".Test"
android:label="@string/title_activity_test">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
======= =======
<application>
<activity android:name=".Test"
android:label="@string/title_activity_test">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="android.app.ListActivity" />
</activity>
</application>
Added 添加
Okay, i think i know what happen. 好吧,我想我知道会发生什么。 So the first time i wanted to create this new project, i missed something, so i deleted it from Eclipse, and from my computer, i started again, without exiting Eclipse, so it build in top of the former AndroidManifest.xml (even if it was deleted). 因此,第一次我想创建这个新项目时,我错过了一些东西,因此我从Eclipse中删除了它,然后从我的计算机中再次启动,而没有退出Eclipse,因此它在以前的AndroidManifest.xml之上构建(即使它已被删除)。 So i deleted all, made a clean, and reboot Eclipse, and know it's working fine. 因此,我删除了所有内容,进行了清洁,然后重新启动Eclipse,并且知道它工作正常。
据我所知,您必须升级到ADT 20.0.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.