Home>

I'm making an animal pictorial book using the 4th edition of the first Android Studio.
I added a constraint in android studio so that the imageView is in the center of the screen, but I get a yellow error.

Android Studio version 3.3.1
kotlin
API 19 Android 4.4 (kitkat)

Thank you.  


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"
tools: context = ". GiraffeFragment" android: id = "@ + id/frameLayout3">
android: src = "@ drawable/giraffe"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: id = "@ + id/imageView4" app: layout_constraintTop_toTopOf = "parent"
android: layout_marginTop = "8dp" app: layout_constraintStart_toStartOf = "parent"
android: layout_marginStart = "8dp" app: layout_constraintBottom_toBottomOf = "parent"
android: layout_marginBottom = "8dp" app: layout_constraintEnd_toEndOf = "parent"
android: layout_marginEnd = "8dp" />

  • Answer # 1

    When I tried referring to the following, I got an error.

    Resource settings
    In the string setting, literals are not recommended and should be set in the resource.
    strings.xml (app_name should match your app_name)


    TestTextView
    Test TextView

    1
    2
    3
    Four

    TestTextView
    Test TextView