Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error:(6, 41) Unresolved reference: databinding Error:(17, 26) Unresolved reference: ActivityMainBinding Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details #4

Open
NingJinBo opened this issue May 23, 2017 · 3 comments

Comments

@NingJinBo
Copy link

报错了~~wing大师,databinding和kotlin不兼容,修改app里面的build文件
在app build.gradle中添加如下代码即可解决
kapt {
generateStubs = true
}

dependencies {
//...
kapt "com.android.databinding:compiler:2.3.0"
}

@qianqianshihang
Copy link

工程的gradle的classpath设置为:
classpath 'com.android.tools.build:gradle:2.4.0-alpha7'
app的gradle的databinding设置为
kapt 'com.android.databinding:compiler:2.4.0-alpha7'

@DonYeung
Copy link

解决方案:https://stackoverflow.com/questions/39764704/errorexecution-failed-for-task-appcompiledebugkotlinafterjava。将project 和app 的build.gradle中的kotlin的版本改为1.1.2即可解决完成编译运行

@githubwing
Copy link
Owner

测试最新版的3.0可以编译,更新studio再试下~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants