2017-03-06 78 views
0

升級到classpath 'com.android.tools.build:gradle:2.3.0'後工作後,和migrating建設,在註釋處理器我得到了下面的錯誤我所有的數據綁定生成的類:數據綁定不升級到搖籃插件2.3

:app:compileInternalDebugJavaWithJavac 
    E:\Projects\Work-projects\mediteo-android\app\src\main\java\com\mediteo\mobile\presentation\daily\intake\adapter\DailyIntakeItem.java:18: error: package com.mediteo.mobile.databinding does not exist 
    import com.mediteo.mobile.databinding.DailyIntakeHeaderItemBinding; 
           ^
    E:\Projects\Work-projects\mediteo-android\app\src\main\java\com\mediteo\mobile\presentation\daily\intake\adapter\DailyIntakeItem.java:19: error: package com.mediteo.mobile.databinding does not exist 
    import com.mediteo.mobile.databinding.DailyIntakeItemBinding; 
    ........ 
    Error:A default public constructor with no argument must be declared in IntakeLocal if a custom constructor is declared. 
    * What went wrong: 
    Execution failed for task ':app:compileInternalDebugJavaWithJavac'. 
    > Compilation failed; see the compiler error output for details. 

不過,我可以導航到那些安卓工作室IDE中的文件

public class DailyIntakeHeaderItemBinding extends android.databinding.ViewDataBinding { 
    ........ 

回答

0

嘗試使無效緩存/重新啓動。或者可能是乾淨的構建。

+0

已經嘗試過運氣( – Lemberg

0

對我來說,問題是在新的註釋處理命令annotationProcessor這是值得關注的是使用apt(現annotationProcessor)所有圖書館的根本原因是Error:A default public constructor with no argument must be declared in IntakeLocal if a custom constructor is declared.,這是錯誤的匕首扔。

爲了解決這個問題我必須更新龍目最新版本: org.projectlombok:lombok:1.16.14

0

我有同樣的錯誤,可以通過添加這對應用的build.gradle依賴修復:

apt 'com.android.databinding:compiler:2.3.0'