Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
- > android.databinding.tool.util.LoggedErrorException: Found data binding errors.
- ****/ data binding error ****msg:Identifiers must have user defined types from the XML file. viewmodel is missing it
- file:C:UsersjacopDocumentsandroidprojectscarBookappsrcmainreslayoutactivity_main.xml
- loc:18:24 - 18:32
- **** data binding error ****
- public class MainActivity extends AppCompatActivity implements LifecycleOwner {
- public MainViewModel viewModel;
- public class MainViewModel extends ViewModel {
- private LatLng origin;
- public LatLng getOrigin() {
- return origin;
- }
- <layout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- tools:context="jacopo.com.gpspath.MainActivity">
- <data>
- <variable name="viewModel" type="jacopo.com.carbook.MainViewModel" />
- </data>
- <TextView
- android:id="@+id/text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@{viewModel.origin.latitude}"/>
- </layout
Add Comment
Please, Sign In to add comment