Android Studio 0.8.11: "Cannot resolve symbol" errors for Gradle Android plugin symbols

2,801 views
Skip to first unread message

jkw...@gmail.com

unread,
Sep 23, 2014, 10:35:30 AM9/23/14
to adt...@googlegroups.com
After downloading and installing Android 0.8.11, I imported my Gradle based Android project that uses Gradle Android plugin 0.13.0 and Gradle 2.1. After the import was complete, I opened build.gradle. All of the Gradle symbols associated with the Gradle Android plugin are marked as "cannot resolve symbol".  The following issue is open to cover this. This is also an issue with the latest IntelliJ IDEA 14 EAP build.  The attached screen shot shows what I am seeing.


Screen Shot 2014-09-23 at 10.18.59 AM.png

Jonathan Steele

unread,
Sep 24, 2014, 10:41:26 PM9/24/14
to adt...@googlegroups.com
should be apply plugin: 'com.android.application'

宋旭东

unread,
Sep 25, 2014, 4:11:54 AM9/25/14
to adt...@googlegroups.com
already com.android.application

在 2014年9月25日星期四UTC+8上午10时41分26秒,Jonathan Steele写道:
D20094A5-A473-4260-B1CF-5BFF6C5C1AC9.png

jkw...@gmail.com

unread,
Sep 29, 2014, 8:59:29 AM9/29/14
to adt...@googlegroups.com
Using apply plugin: 'com.android.application' makes no difference. Android Studio is still flagging all android plugin symbols inside build.grade as "cannot resolve symbol".


On Tuesday, September 23, 2014 10:35:30 AM UTC-4, jkw...@gmail.com wrote:

Kush Goyal

unread,
Sep 29, 2014, 11:46:50 AM9/29/14
to adt...@googlegroups.com
I have facing the same issue and I have also used apply plugin: 'com.android.application'.

This is happening in one of my projects other project gradle files are ok.

also there are these errors too:

'main' in 'build' cannot be applied to '(groovy.lang.Closure)' 

'dependencies' cannot be applied to '(groovy.lang.Closure)'

Android studio sometimes behaves randomly. I have to invalidate cache and restart it.

Karel Michek

unread,
Oct 10, 2014, 10:14:48 AM10/10/14
to adt...@googlegroups.com
Try to replace
 <orderEntry type="jdk" jdkName="Maven Android API 20 Platform" jdkType="Android SDK" /> with
with 
  <orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />

in your.iml file

Karel Michek

unread,
Oct 10, 2014, 10:21:10 AM10/10/14
to adt...@googlegroups.com
Try to replace 
<orderEntry type="jdk" jdkName="Maven Android API 19 Platform" jdkType="Android SDK" />
with 
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
in your.iml file

liatsineam

unread,
Oct 10, 2014, 10:52:19 PM10/10/14
to adt...@googlegroups.com
in my .iml file
<orderEntry type="jdk" jdkName="Android API 20 Platform" jdkType="Android SDK" />

Bryan Herbst

unread,
Oct 11, 2014, 10:45:39 PM10/11/14
to adt...@googlegroups.com
I just had this problem with 0.8.11 two days ago and was able to solve it by deleting the gradle/, .gradle/, and .idea/ folders along with the .imls.

I believe that removing the gradle/ and .gradle/ folders was what really solved it, as it had tried removing the IntelliJ files previously with no luck. In any case, this combination finally solved the issue for me.
Reply all
Reply to author
Forward
0 new messages