Hi,
beim Hochrüsten der maps ergabt sich ein unklares data binding Problem.
Es lief alles glatt inclusive mit binding.getRoot() im Java und buildFeatures{databinding true} im build.gradle.
Als ich das untere layout, das immer funktioniert hatte, einsetzte, wurde getRoot() rot und es kam
folgende Fehlermeldung:
android.databinding.tool.processing.ScopedException: [databinding]
{"msg":"Found \u003clayout\u003e
but data binding is not enabled.
\n\nAdd buildFeatures.dataBinding \u003d true to your build.gradle to enable it.",
"file":"C:\\follow_M\\Android\\DieDritteOKdesktop\\app\\src\\main\\res\\layout\\activity_maps.xml","pos":[]
}
Was müsste im layout geändert werden ? Databinding war schon immer auf true gesetzt.
Merci im Voraus,
Henrique
-------
<!-- einige Texte und images weggelassen -->
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:map="http://schemas.android.com/apk/res-auto"
>
<data>
</data>
<RelativeLayout
android:id="@+id/relativeLayoutFragment"
android:layout_width="match_parent"
android:layout_height="fill_parent">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/buttonStart"
android:layout_above="@+id/infoLink"
tools:context=".MapsActivity"
android:layout_height="250dp" />
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/textViewSQ"
android:layout_above="@+id/buttonStart"
android:layout_alignParentEnd="true"
android:background="@android:color/holo_orange_light"
android:layout_alignParentRight="true"></FrameLayout>
<FrameLayout
android:id="@+id/frame2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/frame"
android:layout_above="@+id/editName"
android:layout_toLeftOf="@+id/editName"
android:background="@android:color/holo_orange_light"
android:visibility="invisible"
android:layout_toStartOf="@+id/editName"></FrameLayout>
<TextView
android:id="@+id/textViewm0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textViewSQ"
android:layout_centerHorizontal="true"
android:layout_marginTop="14dp"
android:gravity="center"
android:text="ubi centrum?"
android:textSize="28sp"
tools:ignore="HardcodedText,UnknownId"
tools:text="ubi centrum?" />
<ImageView
android:id="@+id/imagecf0"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/textViewSQ"
android:contentDescription="@string/cf0"
android:scaleType="fitCenter"
android:src="@drawable/cf0"
android:visibility="visible" />
<ImageView
android:id="@+id/imagecf7"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_alignLeft="@+id/imagecf0"
android:layout_alignStart="@+id/imagecf0"
android:layout_below="@+id/textViewSQ"
android:contentDescription="@string/cf7"
android:scaleType="fitCenter"
android:src="@drawable/cf7"
android:visibility="visible" />
<ImageView
android:id="@+id/imageViewHands"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/bussola"
android:contentDescription="@drawable/bussola"
android:layout_centerHorizontal="true"
android:scaleType="fitCenter"
android:layout_above="@+id/buttonDice"
android:layout_below="@+id/buttonStart" />
<FrameLayout
android:id="@+id/frameExercise"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imageViewLogo"
android:layout_above="@+id/infoLink"
android:layout_alignParentEnd="true"
android:background="@android:color/holo_blue_light"
android:visibility="invisible"
android:layout_alignParentRight="true"></FrameLayout>
<Button
android:id="@+id/buttonDice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/infoLink"
android:layout_alignParentLeft="true"
android:layout_marginBottom="0dp"
android:text="@string/buttonDice"
android:textSize="14sp"
android:visibility="invisible" />
<TextView
android:id="@+id/infoLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:autoLink="web"
android:contentDescription="@string/link"
android:text="Instructions: www.volksnav.de/StreetSmart"
android:textColor="@color/colorPrimary"
android:textColorLink="@color/colorPrimaryDark"
android:textSize="16sp" />
</RelativeLayout>
</layout>
Alles anzeigen