inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

레이아웃에 사진 삽입

에러 나옵니다ㅠㅠ

524

김킥

작성한 질문수 3

0

안녕하세요 말씀해주신대로

<LinearLayout>

이미지뷰 3개

</LinearLayout>

<LinearLayout>

이미지뷰 3개

</LinearLayout>

이렇게 입력했는데 문제가 발생합니다.

problems에서 빨간색으로

Top level element is not completed 이렇게 나옵니다.
코드는 아래와 같습니다.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    android:orientation="vertical"
    >

<LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <ImageView
        android:src="@drawable/bts_1"
        android:layout_height="100dp"
        android:layout_width="100dp"/>

    <ImageView
        android:src="@drawable/bts_2"
        android:layout_height="100dp"
        android:layout_width="100dp"/>

    <ImageView
        android:src="@drawable/bts_3"
        android:layout_height="100dp"
        android:layout_width="100dp"/>
</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height=""/>

    <ImageView
    android:src="@drawable/bts_1"
    android:layout_height="100dp"
    android:layout_width="100dp"/>

    <ImageView
    android:src="@drawable/bts_2"
    android:layout_height="100dp"
    android:layout_width="100dp"/>

    <ImageView
    android:src="@drawable/bts_3"
    android:layout_height="100dp"
    android:layout_width="100dp"/>
</LinearLayout>

</LinearLayout>

 

kotlin firebase android

답변 1

0

개복치개발자

뭔가 잘못된 것 같은데... 제가 새롭게 작성했습니다.

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ImageView
            android:src="@drawable/bts_1"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

        <ImageView
            android:src="@drawable/bts_2"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

        <ImageView
            android:src="@drawable/bts_3"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

    </LinearLayout>


    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ImageView
            android:src="@drawable/bts_1"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

        <ImageView
            android:src="@drawable/bts_2"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

        <ImageView
            android:src="@drawable/bts_3"
            android:layout_height="100dp"
            android:layout_width="100dp"/>

    </LinearLayout>

    

</LinearLayout>

0

김킥

아 해결했습니다. 감사합니다. 제가 업로드한 코드에는

<LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

이렇게 끝에 "/>"을 입력했었는데 잘못된 거였네요ㅠㅠ 감사합니다!!

주사위앱 소개 및 레이아웃 설정 문제

0

79

2

안드로이드 에뮬레이터가 실행이 안 되요...ㅠ

0

133

2

30 강 소스 좀 올려 주십시요

0

94

2

onBackPressed 함수가 동영상 하고 다르게 동작합니다.

0

105

2

ListView 초기 실행 안됩니다.

0

108

2

코딩을 완료하고난후 앱 실행시 자동 종료

0

82

2

datavinding에서 오류가 납니다.

0

63

1

안드로이드 스튜디오 버전 차이로 초기 empyt activity 선택하면 안됩니다.

0

132

2

context의 구별에 대하여

0

81

2

"프롤로그에서 ..." 오류 관련해 직전 질문에 대한 추가 질문입니다.

0

78

2

"프롤로그에서 콘텐츠가 허용되지 않습니다." 오류

0

174

3

해결완료

1

198

2

databinding 설정후 run하면 에러(해결)

0

231

2

databinding 설정 이후 실행시 에러

0

287

4

안드로이드 입문하는 사람입니다.

0

76

1

Firebase uid

0

88

3

activity_main 화면 다름

0

125

2

강의화면과 다른데 맞게진행되는것인가요...????

0

115

2

파이어베이스 질문

0

82

2

ActivityMainBinding에 오류가 납니다

0

143

2

선생님 onBackPressed 작동이 안되는거 같습니다

0

126

2

>app>res>layout 이 존재하지 않습니다.

0

122

2

안드로이드 스튜디오 미어캣 버전 사용 한글 깨짐

0

775

2

안드로이드 스튜디오 오류 발생 시 대처 방법은 요?

0

304

2