How can we integrate sonarqube in android studio (gradle version is above 3.). I have already downloaded the latest version of Sonarqube. Can explain how to integrate sonarqube and Android stdio.
Asked
Active
Viewed 1,644 times
-1
-
1Have you tried out the SonarQube Android Studio plugin? – Dan 0 Sep 20 '18 at 04:43
-
https://medium.com/@sandeeptengale/integrate-sonarqube-for-android-application-development-8e40ec28e343 – Ashvin solanki Sep 20 '18 at 04:51
-
i downloaded sonarqube and run in http://localhost:9000/ and i added some dependencies to my android project. That's it i did. – Dulaj Madusanka Sep 20 '18 at 05:13
-
@Ashvinsolanki In step 2, when i try to add sonar plugins(apply plugin: 'org.sonarqube' apply plugin: 'jacoco-android'), gives some errors. – Dulaj Madusanka Sep 20 '18 at 05:30
-
follow my solution: https://stackoverflow.com/questions/43811106/how-to-integrate-sonarqube-in-android-studio/54773428#54773428 – vicente esparza Feb 19 '19 at 19:33
1 Answers
4
Here are steps to implement sonar in android
- Download more recent Sonar version. [http://www.sonarqube.org/downloads/][1]
- Unzip the archive.
- Go to sonarqube-7.x/bin (or whatever version you downloaded).
- Open a corresponding folder according to your operating system as (linux-x86- 64).
- Find sonar.sh (or StartSonar.bat for Windows).
- Open up a terminal window and execute: sonar.sh start (or just double click StartSonar.bat on windows).
- This command will start sonar listening on localhost:9000.
- Open a browser and enter localhost:9000.The sonar web page should open.
- If you get “page not found” in your browser, try to refresh the page later.
- To add project in sonarqube server run ./gradlew sonar command on Android Studio terminal.

nikhil bansal
- 449
- 5
- 15
-
It would we better if you post some gradle code as well, thanks for your efforts – Akshay Paliwal Sep 20 '18 at 07:20