我正在嘗試將sonarqube集成到我的android項目中。下面是我的根的build.gradle將SonarQube與android項目集成的問題
我試着去關注你就是這裏所說的 - http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle 和 Analyzing Android Project with Lint and SonarQube
plugins {
id "org.sonarqube" version "2.2"
}
sonarqube {
properties {
property "sonar.profile", "Android Lint"
property "sonar.sources", "./src/main/java"
property 'sonar.host.url', '<sonar_qube_server_url>'
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.import_unknown_files', true
property 'sonar.android.lint.report', 'build/outputs/lint-results.xml'
}
}
我從項目的根目錄下運行 -
./gradlew sonarqube
以下錯誤被拋出 -
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19-1' (Expected '/Users/<username>/Library/Android/sdk/add-ons/addon-google_apis-google-19')
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
com/android/build/gradle/api/BaseVariant
> com.android.build.gradle.api.BaseVariant
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
請幫助理解這裏出了什麼問題。
請出示與--stacktrace輸出。你正在使用什麼版本的Gradle? –