本文介绍了<使用权限>元素必须是&man;清单的直接子元素.根元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行我的android应用程序,但遇到以下错误:元素必须是root元素的直接子元素,并且元素类型"application"必须由匹配的结束标记"终止.有人可以给我写正确的"版本吗?谢谢.
I'm trying to run my android app but I'm getting the following error The element must be a direct child of the root element and The element type "application" must be terminated by the matching end-tag "". Can somebody write me the 'correct' version of it? Thanks.
这是我的清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.daytraders"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.daytraders.Login"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</activity>
<activity android:label="@string/app_name" android:name="Profile">
</activity>
<activity android:label="Day Traders USER PANEL" android:name="Main">
</activity>
</application>
<!-- Allow to connect with internet and to know the current network state-->
<uses-permission android:name="android.permission.INTERNET">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
</uses-permission></uses-permission></manifest>
推荐答案
您要去的地方
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.daytraders"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<!-- Allow to connect with internet and to know the current network state -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.daytraders.Login"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="Profile"
android:label="@string/app_name" >
</activity>
<activity
android:name="Main"
android:label="Day Traders USER PANEL" >
</activity>
</application>
</manifest>
这篇关于<使用权限>元素必须是&man;清单的直接子元素.根元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!