Android: Cannot resolve symbol 'compile'

允我心安 提交于 2020-01-24 03:57:06

问题


I was adding a new activity "Settings" with help from android studios Add New wizard. Right after that I get this

Error:(47) A problem occurred evaluating project ':AppName'. Could not find property 'compile' on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@395e73e7.

And it says cannot resolve symbol 'compile'.

Any ideas?


回答1:


Check 'build.gradle' file. It probably has formatting errors where 'compile' is used.




回答2:


In my case in build.gradle file error remove after compile '' format correct it. eg:- compile 'com.android.support:support-v4:23.1.1'



来源:https://stackoverflow.com/questions/24587847/android-cannot-resolve-symbol-compile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!