0

This question has been asked in many different forms but none of them seems to fit my request.

I can't basically find any of the appcompat values intented to be in the auto generated res folder.

In my case, the folder does exists within path:

\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0

but the IDE do not show me suggestions as-I-type related to the appcompat library. Also, if I copy/paste a value from another project (e.g. @color/material_blue_grey_800") the project compile and run correctly. So the problem itself consists in Android Studio not showing suggestion.

I've tried anything: clean, rebuild, re-import, invalidating cache, anything I could possibly think. Any solution to this? Thanks in advance.

Edit: I'm currently using Android Studio 1.3.2 and my dependencies are

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
    compile 'com.android.support:cardview-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'com.afollestad:material-dialogs:0.7.9.1'
    compile files('libs/SOMAAndroidSDK4.4.2.jar')
}

Edit2 : it seems like This Question explain better what I mean. Also, I'm now trying to delete and re-import with gradle the appcompat-v7 library but even if I remove it from the dependencies and the project structure too, the app keep working. Don't really know what else I can do right now.

Community
  • 1
  • 1
Lampione
  • 1,622
  • 3
  • 21
  • 39
  • what does your dependencies section of your build.gradle look like? also which version of Android studio are you currently using – kandroidj Aug 31 '15 at 21:26
  • In latest Android Studio libraries can mark their resources/classes/methods as private. You can still use them but they will not appear in code completion. – Eugen Pechanec Aug 31 '15 at 21:31
  • @inner_class7 see my edit please – Lampione Aug 31 '15 at 21:31
  • @EugenPechanec this sounds strange because in another project of mine I have the same libraries and it works without problem. – Lampione Aug 31 '15 at 21:32
  • @RichardLeMesurier you're not helping at all. As I said, I've already looked at that specific question as many others similar. The only working solution for me was to use a lower library version and eventually compile and generate the APK with the latest version (cleaning up some compatibility errors). – Lampione Sep 11 '15 at 10:25

3 Answers3

1

Unfortunately, this only happens with new project I create and with this one particular one I've made a lot of time ago.

At the moment, the only thing that worked was setting the appcompat library (plus all the others google library) to the version 22.1.1.

Lampione
  • 1,622
  • 3
  • 21
  • 39
0

did you check in your Preferences -> Code Completion?

This is working configuration for me:

enter image description here

in colors.xml as i type i am seeingenter image description here:

kandroidj
  • 13,784
  • 5
  • 64
  • 76
  • Unfortunately my settings are the same as the ones in your screenshot. The IDE does not show the appcompat-v7 suggestion but everything else is shown as normal. – Lampione Aug 31 '15 at 21:19
0

I had the same issue, but this answer helped me https://stackoverflow.com/a/31207367/5247331

just delete .idea folder and all .iml files from the project, and then restart Android Studio

Community
  • 1
  • 1
Vitaly Zinchenko
  • 4,871
  • 5
  • 36
  • 52
  • Thank you. I've already tried this. If I delete the .idea folder, Android Studio does not recognize the project anymore. Is this fix intented to work this way? – Lampione Sep 01 '15 at 11:52
  • Well, I think we just let Android studio recreate these files from scratch. Sometimes it works – Vitaly Zinchenko Sep 01 '15 at 13:05
  • I just find out that any new project I'm creating from scratch just do not work so at this point I think this is an IDE issue. I'm going to re-install now – Lampione Sep 01 '15 at 13:07
  • Before reinstalling it, go to your user folder (I presume you're under Windows) and delete .AndroidStudio1.3 (name may be different) folder. And then restart Android Studio – Vitaly Zinchenko Sep 01 '15 at 14:02
  • After re-installing the problem is still there. I think I'm doing something wrong. – Lampione Sep 01 '15 at 14:49