[android-studio] Search all the occurrences of a string in the entire project in Android Studio

I've just started using Android Studio (IntelliJ), and I now look for the feature to find the occurrence of a string in any of the files in my project. For example: I want to find all the files that contain the string ".getUuid()"

The search at the top right doesn't give me the correct results, and I don't think I can find this feature under Edit > Find.

Could anybody point me at the right direction?

This question is related to android-studio search intellij-idea

The answer is


Press Shift twice and a Search Everywhere dialog will appear.


In Android Studio on a Windows or Linux based machine use shortcut Ctrl + Shift + R to search and replace any string in the whole project.


Use Ctrl + Alt + F combination in Ubuntu.


Android Studio Version 4.0.1 on Mac combination is for me:

Shift + Control + F


You can open the Find in Path dialog by pressing:

Ctrl + Shift + F


On a mac use shift + cmmd + f

To get rid of the screen press esc

I use IntelliJ IDEA version: 2019.2.3 (Community Edition) Build #IC-192.6817.14, built on September 24, 2019 Runtime version: 11.0.4+10-b304.69 x86_64


Android Studio 3.3 seems to have changed the shortcut to search for all references (find in path) on macOS.

In order to do that you should use Ctrl + Shift + F now (instead of Command + Shift + F as wrote on the previous answers):

UPDATE

To replace in path just use Ctrl + Shift + R.

enter image description here


In Android 3.6 on a Mac if you want to export the results to a text file then do the following

Command+Shift+F then enter the text you want to search

Then on Bottom Right click on "Open In Find Window"

Then Right Click On Found Occurrences

Then Export To Text File

Once in text file you can find and replace to remove, sort lines etc... please see screenshots for assistance.

enter image description here

enter image description here


What you want to reach is that, I believe:

  • cmd + O for classes.
  • cmd + shift + O for files.
  • cmd + alt + O for symbols. "wonderful shortcut!"

Besides shift + cmd + f for find in path && double shift to search anywhere. Play with those and you will know what satisfy your need.


Use Ctrl + Shift + F combination for Windows and Linux to search everywhere, it shows preview also.

Use Ctrl + F combination for Windows and Linux to search in current file.

Use Shift + Shift (Double Tap Shift) combination for Windows and Linux to search Project File of Project.


And for all of us who use Eclipse keymaps the shortcut is Ctrl+H. Expect limited options compared to eclipse or you will be disappointed.


In Android Studio on a Windows or Linux based machine use shortcut Ctrl + Shift + F to search any string in whole project. It's easy to remember considering Ctrl + F is used to search in the current file. So just press the Shift as well.

On OSX use the Command key instead of Ctrl


use ctrl + shift + f on windows


Press SHIFT 2 times and you can search Every-where , both Class and Method() in the project.

Ctrl + N for finding only Class name.

Ctrl + E for Recent Files.


Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK Find a file by name in Visual Studio Code Search all the occurrences of a string in the entire project in Android Studio Java List.contains(Object with field value equal to x) Trigger an action after selection select2 How can I search for a commit message on GitHub? SQL search multiple values in same field Find a string by searching all tables in SQL Server Management Studio 2008 Search File And Find Exact Match And Print Line? Java - Search for files in a directory How to put a delay on AngularJS instant search?

Examples related to intellij-idea

IntelliJ: Error:java: error: release version 5 not supported Has been compiled by a more recent version of the Java Runtime (class file version 57.0) Error: Java: invalid target release: 11 - IntelliJ IDEA IntelliJ can't recognize JavaFX 11 with OpenJDK 11 Error: JavaFX runtime components are missing, and are required to run this application with JDK 11 ERROR Source option 1.5 is no longer supported. Use 1.6 or later Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How to configure "Shorten command line" method for whole project in IntelliJ intellij idea - Error: java: invalid source release 1.9 Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle