我今天尝试将项目更新为Gradle 4.4,当我尝试运行时,我得到以下错误输出:
/Users/marianpavel/Documents/GitHub/jurnaldebord/app/build/generated/source/dataBinding/baseClasses/Devel/debug/ro/marianpavel/jurnaldebord/databinding/ActivityCreateCarBinding.java:17: error: cannot find symbol
import ro.marianpavel.jurnaldebord.ViewModels;
^
symbol: class ViewModels
location: package ro.marianpavel.jurnaldebord
/Users/marianpavel/Documents/GitHub/jurnaldebord/app/build/generated/source/dataBinding/baseClasses/Devel/debug/ro/marianpavel/jurnaldebord/databinding/ActivityCreateCarBinding.java:57: error: package ViewModels does not exist
protected ViewModels.CreateCarPresenter mPresenter;
^
/Users/marianpavel/Documents/GitHub/jurnaldebord/app/build/generated/source/dataBinding/baseClasses/Devel/debug/ro/marianpavel/jurnaldebord/databinding/ActivityCreateCarBinding.java:78: error: package ViewModels does not exist
public abstract void setPresenter(@Nullable ViewModels.CreateCarPresenter presenter);
^
/Users/marianpavel/Documents/GitHub/jurnaldebord/app/build/generated/source/dataBinding/baseClasses/Devel/debug/ro/marianpavel/jurnaldebord/databinding/ActivityCreateCarBinding.java:81: error: package ViewModels does not exist
public ViewModels.CreateCarPresenter getPresenter() {
^
4 errors
2 warnings
:app:compileDevelDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDevelDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
构建工具版本:buildToolsVersion "27.0.3"
我的graddle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
到目前为止我一直在尝试:
Invalidate Cache & Restart
Clean Project
Build Project.