简体   繁体   English

Android Studio渲染错误

[英]Android Studio rendering Error

So I just tried to render one of my xml views and I got this error: 所以我只是尝试渲染我的一个xml视图,我收到了这个错误:

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>

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. 这似乎是Android Studio中的一个错误,当您直接编辑xml文件时,它不会更新它的图形布局。 The issue has been raised and I don't think it has been corrected yet. 问题已经提出,我认为它尚未得到纠正。 Here's the issue for you to upvote. 这是你投票的问题

For now, though you don't need to restart the entire Android Studio. 目前,虽然您不需要重新启动整个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. 它会为你节省很多时间。

Closing the tab was quite dramatic for me since I had very very many files in my project. 关闭选项卡对我来说非常引人注目,因为我的项目中有非常多的文件。

Moving the problematic tab between different split views did the trick in a second. 在不同的拆分视图之间移动有问题的选项卡只需一秒钟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM