0

Now, I can fix it. I remove some tag from layout xml.

<?xml version="1.0" encoding="utf-8"?> <<<< Remove this tag from all layout xml.




I add data binding to my android project. I got NullPointerException from Gradle.
Information:Gradle tasks [:MaterialDesign:generateDebugSources, :MaterialDesign:generateDebugAndroidTestSources, :app:generateDebugSources, :app:generateDebugAndroidTestSources]
:MaterialDesign:preBuild UP-TO-DATE
:MaterialDesign:preDebugBuild UP-TO-DATE
:MaterialDesign:checkDebugManifest
:MaterialDesign:preDebugAndroidTestBuild UP-TO-DATE
:MaterialDesign:preDebugUnitTestBuild UP-TO-DATE
:MaterialDesign:preReleaseBuild UP-TO-DATE
:MaterialDesign:preReleaseUnitTestBuild UP-TO-DATE
:MaterialDesign:prepareComAndroidSupportSupportV42221Library UP-TO-DATE
:MaterialDesign:prepareDebugDependencies
:MaterialDesign:compileDebugAidl UP-TO-DATE 
.
.
.
:app:dataBindingProcessLayoutsDebug
line 1:0 extraneous input '?' expecting {COMMENT, SEA_WS, '<', PI}
line 1:0 mismatched input '?' expecting {COMMENT, SEA_WS, '<', PI}
Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'.
> java.lang.NullPointerException (no error message)
Information:BUILD FAILED
Information:Total time: 12.924 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

If I remove this (below), I can build the project normally.

databinding {
    enabled = true
}
kosolart
  • 9
  • 2

0 Answers0