Android提示元素必须后跟属性规范
迷茫
迷茫 2017-04-17 16:10:17
[Android讨论组]


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.example.framelayout"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="19" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <uses-library android:name="android.test.runner"/>
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
                 android:targetPackage="com.itcast.service"android:label="Tests for my app">
</instrumentation>

</manifest>

以上是完整代码。视频上用的是但标签</>这种的,以及我在网上查的也是用的但标签。但是用Alt+/提示出来的是双标签<></>.这个是为什么 ?
还有我检查过代码 没有缺少标签,单标签和双标签instrumentation这里都会提示图片上那个样子的错误。这是为什么?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(1)
PHP中文网

在没有子属性的情况下,< />和<></>是一样的,出现你这种问题的原因很有可能是你的编码问题,确保你的代码书写过程中使用的是统一的字符编码,通常copy人家的代码最容易有这种问题。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号