마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

갤노트5에서 ImageView src 에러 납니다. [closed]

0 추천

안녕하세요, 안드로이드 스튜디오를 시작한지 얼마 안된 뉴비입니다.

노트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}


 

질문을 종료한 이유: drawable-v24 폴더 문제였네요 해결했습니다.
안드뉴비에요 (120 포인트) 님이 2021년 3월 9일 질문
안드뉴비에요님이 2021년 3월 9일 closed
...