我试图在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)
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)
我是一名自学者,在发布此处之前,我在其他地方搜索了此错误消息.我看过这条线但是无法理解错误信息,我很难过.