import - Android Studio suddenly cannot resolve symbols -


android studio 0.4.2 working fine , today opened , red , auto-completion had stopped working. @ imports , seems telling me can't find android.support.v4 of sudden (offering me option remove unused imports). (android.support.v7 seems fine though).

things have tried:

  • rebuilding project
  • cleaning project
  • syncing gradle files
  • closing project, closing , relaunching / reopening
  • file > invalidate caches / restart
  • examining lint, didn't see obvious
  • double checking support libraries date in sdk manager
  • examining build.gradle, although no changes , it's same usual, way working time.

here in case it's relevant:

buildscript {     repositories {         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.7.+'     } } apply plugin: 'android'  repositories {     mavencentral() }  android {     compilesdkversion 19     buildtoolsversion '19.0.0'      defaultconfig {         minsdkversion 8         targetsdkversion 19     } }  dependencies {     compile 'com.android.support:support-v4:19.0.0'     compile 'com.android.support:gridlayout-v7:19.0.0'     compile 'com.android.support:appcompat-v7:19.0.0'     compile 'com.google.android.gms:play-services:4.0.30'     compile project(':libraries:facebook')     compile files('libs/core.jar') } 

when hit "sync gradle" , open "project settings" red error telling me have duplicate library references , remove unused ones.. enter image description here

my project compiles , runs fine need autocomplete working!! have suggestions?

enter image description here

you've gone down list of things helpful, try:

  • exit android studio
  • back project
  • delete .iml files , .idea folder
  • relaunch android studio , reimport project

by way, error messages see in project structure dialog bogus part.

update:

android studio 0.4.3 available in canary update channel, , should solve of these issues. there may lingering problems; if see them in 0.4.3, let know, , try give reliable set of steps reproduce can ensure we've taken care of code paths.


Comments