Android Studio “Open Declaration” like eclipse

后端 未结 7 786
不知归路
不知归路 2020-12-29 20:18

Is there a function like the \"open declaration\" in eclipse, that we can use in the new Android Studio?

Just like F3 button.

相关标签:
7条回答
  • 2020-12-29 21:09

    ^B on the variable.

    There is, but it doesn't work sometimes (unlike Eclispe where it always works). Build project. Searches don't work when using Find Usages nor Go to Implementation etc. Free text searches do work. seems to be a disconnect in how AS loads the gradle projects.

    The good news is if you create a brand new project with all the defaults then these things work. The project we have was ported from Eclipse to Android Studio by a mobile consultancy based in Austin; so, looks like the porting process is not clean.

    In conclusion, the project in which these did not work was fixed by using Import, by using Java 7 (had to fix class path, delete Oracle symlink, etc), and by installing a git client and setting it up to run from the command line. After that, the project not only can be imported but features such as Go To->Declaration started working. And the "NullException" messages which occurred often in Android Studio went away.

    0 讨论(0)
提交回复
热议问题