안녕하세요, 안드로이드 스튜디오를 시작한지 얼마 안된 뉴비입니다.
노트5에서 xml 에서 이미지뷰에 src 넣으면 앱중지 뜨면서 튕
(java에서 setImageResource 메소드 사용해도 똑같습니다.)
파일문제인가해서 기본으로 들어있는 ic_launcher_foreground 사용해도 마찬가지입니다.
갤s10은 잘되는거보니. 호환문제같은건지 증상 원인에 대해 궁금합니다.
(쉽게 설명 해주시면 더욱 감사드리겠습니다.)
게시글 올릴때 글자수 최대제한 때문에
logcat 부분에서 at ~ 하는 부분들빼고 큼직막한것들만 올렸습니다..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:background="@color/BackGround"
android:orientation="vertical"
tools:context=".LogoActivity">
<ImageView
android:id="@+id/lv_test"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/title" />
</LinearLayout>
package com.example.pressurecontlrol;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class LogoActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_logo);
}
}
03-09 21:06:43.361 27420-27420/? E/Zygote: v2
03-09 21:06:43.361 27420-27420/? E/Zygote: accessInfo : 0
03-09 21:06:43.581 27420-27420/com.example.pressurecontlrol E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.pressurecontlrol, PID: 27420
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pressurecontlrol/com.example.pressurecontlrol.LogoActivity}: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class ImageView
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class ImageView
Caused by: android.content.res.Resources$NotFoundException: Resource "com.example.pressurecontlrol:drawable/title" (7f0700a0) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f0700a0 a=-1 r=0x7f0700a0}