我在第一次选择语言后启动片段时获取此日志,即更改Locale以及第一次根据所选语言加载字符串资源.
E/cr_VariationsUtils: Failed reading seed file "/data/user/0/com.example.sample/app_webview/variations_seed_new": /data/user/0/com.example.sample/variations_seed_new (No such file or directory)
E/cr_VariationsUtils: Failed reading seed file "/data/user/0/com.example.sample/app_webview/variations_seed": /data/user/0/com.example.sample/app_webview/variations_seed (No such file or directory)
Run Code Online (Sandbox Code Playgroud) 我启用了数据绑定,但是在执行代码时出现此错误。
e:[kapt]发生异常:android.databinding.tool.util.LoggedErrorException:发现数据绑定错误。
我创建了一个片段类和该类的XML。我能够导入datbindingutil类。
我已经完成了重建/与gradle文件同步/使缓存无效并重新启动,没有任何效果。
<layout>
<!--suppress AndroidUnknownAttribute -->
<data class=".databinding.ProfileFragmentBinding">
<variable
name="user"
type="com.sample.sample.user.User" />
<variable
name="vm"
type="com.sample.sample.user.UserViewModel" />
<variable
name="handler"
type="com.sample.sample.user.profile.ProfileFragment" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
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">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profileIV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium"
android:layout_marginTop="@dimen/medium"
android:contentDescription="@null"
android:src="@mipmap/ic_launcher_round"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:url="@{user.avatarUrl}" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/profileIV"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/profileIV">
<TextView
android:id="@+id/profileNameLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/myriad_pro_semibold"
android:text="@{user.name}"
android:textColor="@color/black_transparent_de"
android:textSize="@dimen/text_regular"
tools:text="NAME" />
<TextView
android:id="@+id/badgeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:fontFamily="@font/myriad_pro_semibold"
android:text="@{user.badge}"
android:textColor="@color/grey_000000"
android:textSize="@dimen/text_regular"
tools:text="Superman" />
<TextView
android:id="@+id/profile_Label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:fontFamily="@font/roboto_bold"
android:text="@{user.badge}" …Run Code Online (Sandbox Code Playgroud)