# \#android

**URL:** https://community.sonarsource.com/tag/android/81.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [SonarScanner 7.3.1 double-registers KMP Android source sets → can't be indexed twice (AGP 9.2)](https://community.sonarsource.com/t/sonarscanner-7-3-1-double-registers-kmp-android-source-sets-cant-be-indexed-twice-agp-9-2/183981)

<div class="topic-metadata">

**Author:** [@Harshit\_Pandey](https://community.sonarsource.com/u/Harshit_Pandey)\
**Replies:** 6\
**Last updated:** [August 8, 2026, 6:29am UTC](https://community.sonarsource.com/t/sonarscanner-7-3-1-double-registers-kmp-android-source-sets-cant-be-indexed-twice-agp-9-2/183981 "2026-08-08T06:29:53Z")

</div>

Versions SonarScanner for Gradle: 7.3.1.8318 SonarQube: Community Build 26.6.0.123539 (reproduced locally) Android Gradle Plugin: 9.2.1 Gradle: 9.5.1 Kotlin: 2.3.0 Module type: Kotlin Multiplatform (org.jetbrains.kotlin…

---

## [SonarScanner for Gradle 7.3.1](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-1/183205)

<div class="topic-metadata">

**Author:** [@aurelien.coet](https://community.sonarsource.com/u/aurelien.coet)\
**Replies:** 3\
**Last updated:** [June 9, 2026, 6:58am UTC](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-1/183205 "2026-06-09T06:58:41Z")

</div>

We are pleased to announce the release of the Sonar scanner for Gradle 7.3.1. This patch version addresses key issues encountered by users running the scanner alongside the Android Gradle Plugin 9. Specifically, this re…

---

## [SonarScanner for Gradle 7.3 fails with AGP 9 task-backed generated sources / KSP](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-fails-with-agp-9-task-backed-generated-sources-ksp/182015)

<div class="topic-metadata">

**Author:** [@matamegger](https://community.sonarsource.com/u/matamegger)\
**Replies:** 3\
**Last updated:** [June 3, 2026, 2:28pm UTC](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-fails-with-agp-9-task-backed-generated-sources-ksp/182015 "2026-06-03T14:28:14Z")

</div>

Hi Sonar team, we are migrating an Android Gradle project to AGP 9 and hit a blocker with SonarScanner for Gradle 7.3.0.8198. The build fails during sonarResolver, before the actual SonarCloud analysis/upload starts. T…

---

## [SonarScanner for Gradle 7.3.0](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-0/181881)

<div class="topic-metadata">

**Author:** [@aurelien.coet](https://community.sonarsource.com/u/aurelien.coet)\
**Replies:** 3\
**Last updated:** [June 2, 2026, 6:34am UTC](https://community.sonarsource.com/t/sonarscanner-for-gradle-7-3-0/181881 "2026-06-02T06:34:11Z")

</div>

We are pleased to announce the release of the Sonar scanner for Gradle 7.3, now supporting Android Gradle Plugin version 9. The release also fixes some issues that were present in previous versions of the scanner and mo…

---

## [Sonar-scanner-gradle 7.3.0: Incorrect sonar.java.binaries](https://community.sonarsource.com/t/sonar-scanner-gradle-7-3-0-incorrect-sonar-java-binaries/182043)

<div class="topic-metadata">

**Author:** [@julioyg](https://community.sonarsource.com/u/julioyg)\
**Replies:** 4\
**Last updated:** [May 27, 2026, 3:53pm UTC](https://community.sonarsource.com/t/sonar-scanner-gradle-7-3-0-incorrect-sonar-java-binaries/182043 "2026-05-27T15:53:57Z")

</div>

Environment sonar-scanner-gradle: 7.3.0.8198 Android Gradle Plugin: 9.1.1 Gradle: 9.4.1 Description The new AndroidConfig.java class (introduced in SCANGRADLE-315 / PR #493 for AGP 9 support) hardcodes an incorrect pat…

---

## [Use overall code coverage conditions as quality gate on Pull Requests](https://community.sonarsource.com/t/use-overall-code-coverage-conditions-as-quality-gate-on-pull-requests/70109)

<div class="topic-metadata">

**Author:** [@vicsonvictor](https://community.sonarsource.com/u/vicsonvictor)\
**Replies:** 21\
**Last updated:** [May 10, 2026, 9:34pm UTC](https://community.sonarsource.com/t/use-overall-code-coverage-conditions-as-quality-gate-on-pull-requests/70109 "2026-05-10T21:34:02Z")

</div>

which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) Sonarqube Scanner CLI: 4.7.0.2747 what are you trying to achieve We want our Pull Request quality gates to work based on overall …

---

## [Sonarcloud not working with Android Gradle Plugin 9.1.0](https://community.sonarsource.com/t/sonarcloud-not-working-with-android-gradle-plugin-9-1-0/178883)

<div class="topic-metadata">

**Author:** [@Barry\_Irvine](https://community.sonarsource.com/u/Barry_Irvine)\
**Replies:** 8\
**Last updated:** [May 6, 2026, 10:43am UTC](https://community.sonarsource.com/t/sonarcloud-not-working-with-android-gradle-plugin-9-1-0/178883 "2026-05-06T10:43:23Z")

</div>

Android Gradle plugin fails SonarQube version: 7.2.3.7755 Android Gradle Plugin version: 9.1.0 When upgrading to Android Gradle Plugin 9.1.0 we can no longer execute: ./gradlew sonar on the command-line because it fa…

---

## [Sonar Gradle Plugin crashes on AGP 9: 'AppExtension' does not exist for :app:sonarResolver task](https://community.sonarsource.com/t/sonar-gradle-plugin-crashes-on-agp-9-appextension-does-not-exist-for-sonarresolver-task/172694)

<div class="topic-metadata">

**Author:** [@michael-winkler](https://community.sonarsource.com/u/michael-winkler)\
**Replies:** 9\
**Last updated:** [April 30, 2026, 9:10am UTC](https://community.sonarsource.com/t/sonar-gradle-plugin-crashes-on-agp-9-appextension-does-not-exist-for-sonarresolver-task/172694 "2026-04-30T09:10:12Z")

</div>

Could not determine the dependencies of task ‘:sonar’. Could not create task ‘:app:sonarResolver’. Extension of type ‘AppExtension’ does not exist. Currently registered extension types: \[ExtraPropertiesExtension, Sona…

---

## [Working towards the support of Android Gradle Plugin 9](https://community.sonarsource.com/t/working-towards-the-support-of-android-gradle-plugin-9/177015)

<div class="topic-metadata">

**Author:** [@Dorian\_Burihabwa](https://community.sonarsource.com/u/Dorian_Burihabwa)\
**Replies:** 8\
**Last updated:** [April 30, 2026, 9:09am UTC](https://community.sonarsource.com/t/working-towards-the-support-of-android-gradle-plugin-9/177015 "2026-04-30T09:09:03Z")

</div>

Hey folks, With the release Android Gradle Plugin 9, we assume most of you will be migrating to the newest version of AGP very soon. However, as some of you have attempted to do so, we have been made aware of conflicts …

---

## [Execution failed for task ‘:app:sonar’ for Android CI projects](https://community.sonarsource.com/t/execution-failed-for-task-sonar-for-android-ci-projects/179624)

<div class="topic-metadata">

**Author:** [@djamn](https://community.sonarsource.com/u/djamn)\
**Replies:** 1\
**Last updated:** [March 16, 2026, 2:50pm UTC](https://community.sonarsource.com/t/execution-failed-for-task-sonar-for-android-ci-projects/179624 "2026-03-16T14:50:47Z")

</div>

Hi, so last year I already opened a question about this topic: Execution failed for task ':app:sonar' This time I followed these steps again: Created an organization on GitHub Created repository Created a Kotlin Andro…

---

## [Sonarqube For Android with AGP 8.5](https://community.sonarsource.com/t/sonarqube-for-android-with-agp-8-5/136188)

<div class="topic-metadata">

**Author:** [@Kavi](https://community.sonarsource.com/u/Kavi)\
**Replies:** 7\
**Last updated:** [March 11, 2026, 1:18pm UTC](https://community.sonarsource.com/t/sonarqube-for-android-with-agp-8-5/136188 "2026-03-11T13:18:37Z")

</div>

I am trying to Run Sonarqube on my Android project with runs on AGP 8.5 My Sonar Version is 6.0.1.5171 ./gradlew sonarqube Returns the below exception What went wrong: com/android/build/gradle/api/BaseVariant com…

---

## [:app:sonarResolver failed to resolve files for :app:compileClasspath for sub module](https://community.sonarsource.com/t/sonarresolver-failed-to-resolve-files-for-compileclasspath-for-sub-module/177918)

<div class="topic-metadata">

**Author:** [@kalpeshp](https://community.sonarsource.com/u/kalpeshp)\
**Replies:** 1\
**Last updated:** [February 18, 2026, 1:34pm UTC](https://community.sonarsource.com/t/sonarresolver-failed-to-resolve-files-for-compileclasspath-for-sub-module/177918 "2026-02-18T13:34:07Z")

</div>

Getting below error after upgrading sonar plugin version from 4.4.1.3373 to 7.2.2.6593. Execution failed for task ':app:sonarResolver'. \> Could not resolve all files for configuration ':app:compileClasspath'. \> Could …

---

## [Sonar gradle scanner fails with exception NoClassDefFoundError: okhttp3/internal/Util](https://community.sonarsource.com/t/sonar-gradle-scanner-fails-with-exception-noclassdeffounderror-okhttp3-internal-util/138027)

<div class="topic-metadata">

**Author:** [@Cornel\_Gligan](https://community.sonarsource.com/u/Cornel_Gligan)\
**Replies:** 21\
**Last updated:** [January 19, 2026, 10:40am UTC](https://community.sonarsource.com/t/sonar-gradle-scanner-fails-with-exception-noclassdeffounderror-okhttp3-internal-util/138027 "2026-01-19T10:40:30Z")

</div>

Hello, Starting with sonar gradle plugin v. 6.0.0.5145 when run sonar scan command, on an Android project, the sonar task fails with following cause: “java.lang.NoClassDefFoundError: okhttp3/internal/Util”. The scan fa…

---

## [How to provide compiled Java classes with sonar.java.binaries property using the Sonar Gradle Plugin](https://community.sonarsource.com/t/how-to-provide-compiled-java-classes-with-sonar-java-binaries-property-using-the-sonar-gradle-plugin/141596)

<div class="topic-metadata">

**Author:** [@BerkayMutlu](https://community.sonarsource.com/u/BerkayMutlu)\
**Replies:** 5\
**Last updated:** [November 24, 2025, 1:46pm UTC](https://community.sonarsource.com/t/how-to-provide-compiled-java-classes-with-sonar-java-binaries-property-using-the-sonar-gradle-plugin/141596 "2025-11-24T13:46:51Z")

</div>

Hello, we are adding Sonar to our Android project. We use Sonar Gradle Plugin (version 6.2.0.5505). Some modules in our project have Java classes. When we run the “sonar” task we get this error: org.sonar.java.AnalysisE…

---

## [Error when running sonar task with Gradle 9.0.0-rc-1](https://community.sonarsource.com/t/error-when-running-sonar-task-with-gradle-9-0-0-rc-1/143857)

<div class="topic-metadata">

**Author:** [@G00fY2](https://community.sonarsource.com/u/G00fY2)\
**Replies:** 26\
**Last updated:** [November 24, 2025, 11:48am UTC](https://community.sonarsource.com/t/error-when-running-sonar-task-with-gradle-9-0-0-rc-1/143857 "2025-11-24T11:48:04Z")

</div>

Currently we prepare the migration to Gradle 9. Our whole Android project build and pipeline is working so far. But we get the following error when running sonar Gradle task: \[2025-07-03T14:42:18.387Z\] \> Task :sonar FAI…

---

## [Can't see code & coverage info from PR scan but works for local scans](https://community.sonarsource.com/t/cant-see-code-coverage-info-from-pr-scan-but-works-for-local-scans/151565)

<div class="topic-metadata">

**Author:** [@steliospap-luscii](https://community.sonarsource.com/u/steliospap-luscii)\
**Replies:** 1\
**Last updated:** [October 30, 2025, 12:34pm UTC](https://community.sonarsource.com/t/cant-see-code-coverage-info-from-pr-scan-but-works-for-local-scans/151565 "2025-10-30T12:34:18Z")

</div>

I ran the following gradle tasks locally on my machine and successfully got the analysis results on sonar cloud for that branch: ./gradlew clean :app:assembleStaging variantCoverage lintStaging detekt -PignoreFailures s…

---

## [kotlin:S5612 should adjust its behavior for function with @Composable annotations](https://community.sonarsource.com/t/kotlin-s5612-should-adjust-its-behavior-for-function-with-composable-annotations/148135)

<div class="topic-metadata">

**Author:** [@Qheb](https://community.sonarsource.com/u/Qheb)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 8:18am UTC](https://community.sonarsource.com/t/kotlin-s5612-should-adjust-its-behavior-for-function-with-composable-annotations/148135 "2025-09-05T08:18:30Z")

</div>

What language is this for? Kotlin for Android, with Jetpack Compose Which rule? kotlin:S5612 Lambdas should not have too many lines Are you using SonarQube Server Developer Edition v2025.3.1 (109879) So…

---

## [kotlin:S6291: Android SharedPreferences security recommendation is out-of-date](https://community.sonarsource.com/t/kotlin-android-sharedpreferences-security-recommendation-is-out-of-date/140574)

<div class="topic-metadata">

**Author:** [@jonnyandrewgds](https://community.sonarsource.com/u/jonnyandrewgds)\
**Replies:** 2\
**Last updated:** [July 2, 2025, 2:22pm UTC](https://community.sonarsource.com/t/kotlin-android-sharedpreferences-security-recommendation-is-out-of-date/140574 "2025-07-02T14:22:18Z")

</div>

When using SharedPreferences in an Android app with minSdk set to API 29 (Android 10), Sonar raises the following security hotspot: Make sure using an unencrypted database is safe here. Using unencrypted databases in …

---

## [How to exclude whole folder but keep certain files?](https://community.sonarsource.com/t/how-to-exclude-whole-folder-but-keep-certain-files/143186)

<div class="topic-metadata">

**Author:** [@Guilhermo-42](https://community.sonarsource.com/u/Guilhermo-42)\
**Replies:** 1\
**Last updated:** [June 23, 2025, 2:16pm UTC](https://community.sonarsource.com/t/how-to-exclude-whole-folder-but-keep-certain-files/143186 "2025-06-23T14:16:00Z")

</div>

Hi guys. I am using SonarQube Cloud to analyse coverage from my codebase. I have a structure like: /\*\*importantPackage1\*\* /\*\*importnatPackage2\*\* /nonImportantPackage3 nonImportantPackage3/\*\*ImportantFile\*\*.kt no…

---

## [Not seeing Android Lint report issues in SonarQube server](https://community.sonarsource.com/t/not-seeing-android-lint-report-issues-in-sonarqube-server/142698)

<div class="topic-metadata">

**Author:** [@richard.w](https://community.sonarsource.com/u/richard.w)\
**Replies:** 17\
**Last updated:** [June 17, 2025, 10:01am UTC](https://community.sonarsource.com/t/not-seeing-android-lint-report-issues-in-sonarqube-server/142698 "2025-06-17T10:01:01Z")

</div>

Hello, I am using SonarQube server 2025.2. I have been trying to see my Android lint report issues in the SonarQube server UI. I have verified that I am importing the report properly using the property sonar.androidLint…

---

## [SonarQube Cloud now detects injection vulnerabilities in Kotlin and Android applications](https://community.sonarsource.com/t/sonarqube-cloud-now-detects-injection-vulnerabilities-in-kotlin-and-android-applications/141851)

<div class="topic-metadata">

**Author:** [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Replies:** 0\
**Last updated:** [May 26, 2025, 1:18pm UTC](https://community.sonarsource.com/t/sonarqube-cloud-now-detects-injection-vulnerabilities-in-kotlin-and-android-applications/141851 "2025-05-26T13:18:05Z")

</div>

Hello Kotlin and Android Developers, You asked, and we listened: your wait is over! We’re excited to announce that SonarQube Cloud now supports taint analysis for Kotlin, empowering you to detect injection vulnerabilit…

---

## [Cannot build specific AndroidVariant on GitHub Actions](https://community.sonarsource.com/t/cannot-build-specific-androidvariant-on-github-actions/118886)

<div class="topic-metadata">

**Author:** [@Gopikrishnan\_S](https://community.sonarsource.com/u/Gopikrishnan_S)\
**Replies:** 11\
**Last updated:** [May 23, 2025, 2:18pm UTC](https://community.sonarsource.com/t/cannot-build-specific-androidvariant-on-github-actions/118886 "2025-05-23T14:18:18Z")

</div>

I’m facing issues when running a SonarQube scan for a specific Android variant (envSandboxDebug ) in a multi-module Android project. The entire AndroidVariants in the project is built before the scan, significantly incre…

---

## [Disable access to external entities in XML parsing not be able resolve on Android API 31 (Java 11)](https://community.sonarsource.com/t/disable-access-to-external-entities-in-xml-parsing-not-be-able-resolve-on-android-api-31-java-11/141392)

<div class="topic-metadata">

**Author:** [@gurkanaytekin](https://community.sonarsource.com/u/gurkanaytekin)\
**Replies:** 1\
**Last updated:** [May 19, 2025, 1:09pm UTC](https://community.sonarsource.com/t/disable-access-to-external-entities-in-xml-parsing-not-be-able-resolve-on-android-api-31-java-11/141392 "2025-05-19T13:09:00Z")

</div>

Language: Java 11 on Android API 31 Rule: Disable access to external entities in XML parsing. Why: Because not working setFeature with DocumentBuilderFactory on Android. Using: Enterprise Edition - Version 9.9.4 with …

---

## [SonarQube Gradle Plugin 6.0 breaks Android tasks](https://community.sonarsource.com/t/sonarqube-gradle-plugin-6-0-breaks-android-tasks/130863)

<div class="topic-metadata">

**Author:** [@G00fY2](https://community.sonarsource.com/u/G00fY2)\
**Replies:** 11\
**Last updated:** [April 23, 2025, 8:04pm UTC](https://community.sonarsource.com/t/sonarqube-gradle-plugin-6-0-breaks-android-tasks/130863 "2025-04-23T20:04:38Z")

</div>

When updating to latest SonarQube Gradle plugin 6.0.0.5145 Android tasks in our project fail with NoClassDefFoundError exception. I assume the reason for this is because of Bouncy Castle incompatibilities introduced by u…

---

## [How to upload Test Coverage, JaCoCo, Multi Module, Android](https://community.sonarsource.com/t/how-to-upload-test-coverage-jacoco-multi-module-android/137992)

<div class="topic-metadata">

**Author:** [@waffiqaziz](https://community.sonarsource.com/u/waffiqaziz)\
**Replies:** 3\
**Last updated:** [March 31, 2025, 4:34pm UTC](https://community.sonarsource.com/t/how-to-upload-test-coverage-jacoco-multi-module-android/137992 "2025-03-31T16:34:24Z")

</div>

Hi, I need help about how to upload test coverage. Currently my configuration: // build.gradle.kts (project root) plugins { ... id("org.sonarqube") version "6.0.1.5171" } sonar { properties { property("sonar…

---

## [Configuring SonarQube for Multi-Module Gradle Project with Separate Sonar Projects](https://community.sonarsource.com/t/configuring-sonarqube-for-multi-module-gradle-project-with-separate-sonar-projects/134637)

<div class="topic-metadata">

**Author:** [@tilak](https://community.sonarsource.com/u/tilak)\
**Replies:** 3\
**Last updated:** [March 28, 2025, 12:38pm UTC](https://community.sonarsource.com/t/configuring-sonarqube-for-multi-module-gradle-project-with-separate-sonar-projects/134637 "2025-03-28T12:38:11Z")

</div>

SonarQube Version: v10.8.1 Scanner Version: 5.1.0.4882 Plugins Used: sonarqube-gradle-plugin Deployment Method: gradle groovy, Github Action I have a multi-module Gradle project, and I want to configure SonarQube so …

---

## [Analyze Decompiled APK](https://community.sonarsource.com/t/analyze-decompiled-apk/134729)

<div class="topic-metadata">

**Author:** [@ziomich](https://community.sonarsource.com/u/ziomich)\
**Replies:** 1\
**Last updated:** [February 7, 2025, 4:55pm UTC](https://community.sonarsource.com/t/analyze-decompiled-apk/134729 "2025-02-07T16:55:02Z")

</div>

We are trying to analyze a decompiled code from our APK. The decompilation happened with MobSF and we are left mostly with .java files (or smali). We would like to analyze further with sonarqube. Is it possible to perfo…

---

## [Sonarqube is unable to pickup code coverage report generated by Jacoco in my gitlab CI pipeline](https://community.sonarsource.com/t/sonarqube-is-unable-to-pickup-code-coverage-report-generated-by-jacoco-in-my-gitlab-ci-pipeline/107592)

<div class="topic-metadata">

**Author:** [@Raja\_Babar](https://community.sonarsource.com/u/Raja_Babar)\
**Replies:** 16\
**Last updated:** [January 10, 2025, 2:25pm UTC](https://community.sonarsource.com/t/sonarqube-is-unable-to-pickup-code-coverage-report-generated-by-jacoco-in-my-gitlab-ci-pipeline/107592 "2025-01-10T14:25:30Z")

</div>

my build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.excludes = \[ '\*\*/databinding/\*Binding.\*', '\*\*/R.class', …

---

## [I got Duplicated Lines which is actually it should not](https://community.sonarsource.com/t/i-got-duplicated-lines-which-is-actually-it-should-not/132793)

<div class="topic-metadata">

**Author:** [@waffiqaziz](https://community.sonarsource.com/u/waffiqaziz)\
**Replies:** 2\
**Last updated:** [January 6, 2025, 2:20pm UTC](https://community.sonarsource.com/t/i-got-duplicated-lines-which-is-actually-it-should-not/132793 "2025-01-06T14:20:23Z")

</div>

I have two response data class and using moshi which both almost same and marks as duplicate, i think it shouldn’t marks as duplicate @JsonClass(generateAdapter = false) data class MovieTvCastItemResponse( @Json(name…

---

## [SonarCloud PR Analysis/Decoration on BitBucket Cloud not working](https://community.sonarsource.com/t/sonarcloud-pr-analysis-decoration-on-bitbucket-cloud-not-working/39903)

<div class="topic-metadata">

**Author:** [@Bam](https://community.sonarsource.com/u/Bam)\
**Replies:** 5\
**Last updated:** [December 4, 2024, 10:19am UTC](https://community.sonarsource.com/t/sonarcloud-pr-analysis-decoration-on-bitbucket-cloud-not-working/39903 "2024-12-04T10:19:33Z")

</div>

Private BitBucket Cloud repo for Android project. Analysis ran in BitBucket Cloud Pipeline. I am having an issue with the SonarCloud PR Analysis, which in turn seems to be affecting the SonarCloud PR Decoration. It se…

[Next page](https://community.sonarsource.com/tag/android/81.md?match_all_tags=true&page=1&tags%5B%5D=android)
