Java 拒绝访问查找属性“ro.sf.lcd_”
我的程序运行正常,但编译器中显示了此错误。如何修复它 在谷歌上找不到关于这个的答案,我检查了很多次 主要活动Java 拒绝访问查找属性“ro.sf.lcd_”,java,android,android-studio,Java,Android,Android Studio,我的程序运行正常,但编译器中显示了此错误。如何修复它 在谷歌上找不到关于这个的答案,我检查了很多次 主要活动 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http:/
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!-- username-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/username_TIL"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="100dp"
android:elevation="2dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/username_TIET"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/username" />
</com.google.android.material.textfield.TextInputLayout>
<!-- password-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_TIL"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_below="@id/username_TIL">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password_TIET"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="password"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- confirmPassword-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/confirmPassword_TIL"
android:layout_width="250dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_below="@id/password_TIL">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/confirmPassword_TIET"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/confirm_password"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- SignIn-->
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/signIn_BTN"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/sign_in"
android:textColor="@android:color/white"
app:cornerRadius="50dp"
android:elevation="2dp"
android:layout_below="@id/confirmPassword_TIL"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:background="@android:color/holo_blue_light"/>
</RelativeLayout>
我也有同样的问题,但我的问题是因为屏幕密度。你可能需要修改你的图像或图标大小,如果有在可绘制文件夹,然后生成一个副本到以下目录
res/
drawable-xxxhdpi/
example.png
drawable-xxhdpi/
example.png
drawable-xhdpi/
example.png
drawable-hdpi/
example.png
drawable-mdpi/
example.png
要了解更多信息,请阅读查看此链接-是的,谷歌中有一些内容…不,这并不能回答问题我有很多图像,应该在所有这些图像上执行此操作吗?是的,您应该将所有图像的副本分发到这些目录中…然后系统将根据设备的像素密度自动选择正确的图像您的应用程序正在以下服务器上运行:
res/
drawable-xxxhdpi/
example.png
drawable-xxhdpi/
example.png
drawable-xhdpi/
example.png
drawable-hdpi/
example.png
drawable-mdpi/
example.png