[英]The <uses-permission> element must be a direct child of the <manifest> root element
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 "". 我正在尝试运行我的Android应用程序,但我收到以下错误元素必须是根元素的直接子元素,元素类型“application”必须由匹配的结束标记“”终止。 Can somebody write me the 'correct' version of it?
有人可以给我写'正确'的版本吗? Thanks.
谢谢。
This is my manifest file 这是我的清单文件
<?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>
here you go 干得好
<?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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.