Android Studio呈现错误 [英] Android Studio rendering Error

查看:46
本文介绍了Android Studio呈现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我只是尝试呈现我的xml视图之一,但出现了这个错误:

So I just tried to render one of my xml views and I got this error:

Exception raised during rendering: Binary XML file line #-1: No start tag found!

有什么想法吗?我已在以下清单文件中添加了______________________________ 清单:

Any ideas? I've included the manifest file below______________________________ manifest:

   <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.adrian.trucktracker">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/legionicon"
        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>
        <activity
            android:name=".Locator"
            android:label="@string/title_activity_locator" >
        </activity>
    </application>

</manifest>

推荐答案

由于无法发表评论,因此将其发布为回复. 这似乎是Android Studio中的错误,当您直接编辑xml文件时,它的图形布局尚未更新.这个问题已经提出,我认为它还没有得到纠正.这是

Since I cannot comment yet, I'm posting this as a reply. This seems to be a bug in Android Studio where when you edit the xml file directly, it doesn't update in it's graphical layout yet. The issue has been raised and I don't think it has been corrected yet. Here's the issue for you to upvote.

目前,尽管您无需重新启动整个Android Studio.只需关闭选项卡,然后从项目导航窗格中将其重新打开即可.它会正确加载.这样可以节省您很多时间.

For now, though you don't need to restart the entire Android Studio. Just close the tab and reopen it from the project navigation pane. It'll load correctly. It'll save you a lot of time.

这篇关于Android Studio呈现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆