小编Muh*_*bad的帖子

activity_main.xml的视图未显示在activity_main.xml的图形布局中

我试图在TextView下包含一个视图,TextView显示在图形布局中但不显示在视图中.我附上了代码和图形布局.任何人都可以帮助我,错误是什么,我怎么能解决它...

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    tools:context="com.example.dt_4000.MainActivity"
    tools:ignore="MergeRootFrame" 
    >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="right|center_vertical"
        android:text="DT-4000"
        android:textColor="#BA0"
        android:textSize="36sp" />

    <View
        android:id="@+id/view1"
        android:layout_width="wrap_content"
        android:layout_height="16dip"
        android:background="#F90"

        />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

xml eclipse android android-layout

1
推荐指数
1
解决办法
2195
查看次数

operator'+'不能应用于java.lang.string

catch (IOException e) {
    Log.e(TAG, "Error Loading ", + nextImageName, e);
} 
Run Code Online (Sandbox Code Playgroud)

上面的代码生成错误消息:

"operator '+' cannot be applied to java.lang.string"
Run Code Online (Sandbox Code Playgroud)

我是一名自学者,在发布此处之前,我在其他地方搜索了此错误消息.我看过这条线但是无法理解错误信息,我很难过.

java android

-3
推荐指数
2
解决办法
4569
查看次数

标签 统计

android ×2

android-layout ×1

eclipse ×1

java ×1

xml ×1