gpt4 book ai didi

android - 元素必须是 根元素的直接子元素

转载 作者:太空宇宙 更新时间:2023-11-03 10:21:16 25 4
gpt4 key购买 nike

我正在尝试运行我的 Android 应用程序,但出现以下错误元素必须是根元素的直接子元素并且元素类型“application”必须由匹配的结束标记“”终止。有人可以给我写它的“正确”版本吗?谢谢。

这是我的 list 文件

<?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>

关于android - <uses-permission> 元素必须是 <manifest> 根元素的直接子元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20792728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com