4

I had updated my Android Studio yesterday, and wondering that Resolving resource by CTRL+CLICK is not working as it was working in earlier versions.

Please consider a line written below:

 mBinder.fabCart.setOnClickListener(this);

Previously when I was doing "CTLR+CLICK" on fabCart is was taking me to the XML. But in Android Studio 3.1 I can not reach to there directly. I need to go to setContentView and by clicking on Layout File Name "CTRL+CLICK works"

Also when I write:

@Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.fabCart:
                break;
        }
    }

From here "CTRL+CLICK" works as expected.

Can anyone let me know how to enable/set resolve references same as earlier versions?

Nikunj Peerbits
  • 785
  • 4
  • 12

4 Answers4

7

Invalidate caches and restart android studio works for my case.

File -> Invalidate caches or Restart -> Invalidate caches and Restart
Jithin Jude
  • 840
  • 14
  • 19
3

Try upgrading the kotlin_version to the latest version

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
zilong
  • 71
  • 3
  • This should be the accepted answer, solved my problem. If you update plugin of Kotlin, and don't change reference to latest one in project gradle file. then you might experience this. – Wajid Sep 29 '21 at 07:27
2

Try this

File --- settings --- keymap --- under Keymaps select eclipse

Or in the searchbox type jump and there you can find option to change key combination.

AbhayBohra
  • 2,047
  • 24
  • 36
0

Try upgrading the gradle dependency to the latest version. My version is com.android.tools.build:gradle:3.3.0

I ran into a similar issue on Android Studio 3.3 with only kotlin files. Java files were working fine. I noticed new projects were fine with kotlin so I checked which dependencies were different. My gradle versions were not matching.

Tim
  • 1
  • 1