Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio 3.3 Go to Declaration does not work

Today, I upgrade stable release of Android Studio 3.3 and then I realize that the common action go to declaration by Cmd + Left Click or Cmd + B does not work anymore. Instead, It goes to declaration in R.java

Now, I must double shift on layout/drawable/mipmap file to go to it's declaration. But, this action does not work with resource id/color/string... So, now it is hard to find out input value from resource.

Is there anyway to make this function back? I think it really helpful.

Any suggestion is appreciate

like image 876
Robust Avatar asked Jan 29 '19 09:01

Robust


2 Answers

I have faced same issue. After spending so much time on this i found proper solution for this.

1). Upgrade your project gradle like

 classpath 'com.android.tools.build:gradle:3.3.0'

If this not work than try below method

2). Just delete

.gradle
.idea
build 

folder from your project and reopen the project. and it will solve this issue.

If you have multiple module in your project than remove all those folder from all modules.

Hope this will work for you as it worked for me.

like image 106
Lokesh Desai Avatar answered Oct 08 '22 19:10

Lokesh Desai


Its not removed. Its working fine.

You can do following things:

  1. You can restart Android Studio
  2. May be you are clicking on removed ID or STRING or COLORS. So may be that is available in R.java but removed from directory. You can clean project and try again.
  3. Even If its not working, You can use Invalidate Cache and Restart option.

Hope 2nd point is happened to you.

Thank you.

like image 38
Pratik Butani Avatar answered Oct 08 '22 17:10

Pratik Butani