【问题标题】:Android rendering ProblemsAndroid 渲染问题
【发布时间】:2016-07-06 15:14:24
【问题描述】:

在此处输入图像描述我无法启动并运行 android studio,甚至无法运行像 hello world 这样的简单程序。我不断遇到渲染问题。当我在 API 之间来回切换时,有时会清除并在我返回 API10 时再次返回,我想使用 API10,因为这将在很多平台上得到支持。

[AndroidStudio 渲染][1]

这是 Content.xml 文件

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res   
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.voxstudios.tryagain.whatda"
tools:showIn="@layout/activity_whatda">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello youtube"
    tools:ignore="HardcodedText"
    android:textSize="@android:dimen/app_icon_size" />

以及 Activity.xml 文件

<?xml version="1.0" encoding="utf-8"?>

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.voxstudios.tryagain.whatda">

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_whatda" />

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    android:src="@android:drawable/ic_dialog_email" />

</android.support.design.widget.CoordinatorLayout>

还有 manifest.xml 文件

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

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

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

我是 Android 的菜鸟,所以任何帮助都是 appriciated

[AndroidStudio 镜像][2]

![2]:http://i.stack.imgur.com/VP8W8.png

【问题讨论】:

    标签: android rendering


    【解决方案1】:
    • 有时点击“files”然后点击“invalidate caches/restart”很有用。
    • 使用稳定版本的 Android Studio 确保它不是错误!

    【讨论】:

      猜你喜欢
      • 2013-08-14
      • 2016-03-31
      • 2019-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多