Я должен проанализировать свой проект с помощью плагина sonarqube для Gradle.Я установил зависимости плагина.Но каждый раз, когда я запускаю команду "gradlew sonarqube", она показывает мне эту ошибку.У меня версия 5.1e Gradle и JDK 1.8.0_211.
Я уже пытался проверить опцию «Использовать встроенный JDK», я уже пытался снять флажок «Мгновенный запуск» в Android Studio.У меня нет никаких подсказок.
Это ошибка: * Что пошло не так: возникла проблема при настройке проекта ': app'.
Не удалось уведомить слушателя оценки проекта.Неинициализированный объект существует в обратной ветви. 142 Сведения об исключении: Местоположение: com / android / build / gradle / internal / pipeline / VariantInfoImpl.(Lcom / Android / build / gradle / внутренняя / область / VariantScope;) V @ 200: goto Причина: в байт-коде существует ошибка Байт-код: 0x0000000: 2b12 3cb8 0034 2a2b b900 4201 0059 1244 0x0000010: b800 47b6 004d b900 5201 002b b900 5201 002b b90x0000020: 0059 1256 B800 472b B900 4201 0059 тысячу двести сорок четыре 0x0000030: B800 47b6 005a C000 5c59 125e B800 47b9 0x0000040: 0061 0100 5912 63b8 0047 2bb9 0042 0100 0x0000050: 5912 44b8 0047 B600 6759 1269 B800 47c0 0x0000060: 006b 4d3a 0e3a 0d36 0c3a 0b03 3e2c 3a040x0000070: bb00 6d59 2C10 0ab8 0073 B700 76c0 0078 0x0000080: 3a05 0336 0619 04b9 007C 0100 3a07 1907 0x0000090: B900 8101 0099 0036 1907 B900 8501 003A 0x00000a0: 0819 0519 08c0 0087 3a09 3a0f 0336 0a19 0x00000b0: 0959 +1289 B800 47b9 008A 0100 3A10 190F0x00000c0: 1910 b900 8e02 0057 a7фф
1.строить.gradle (приложение)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
dataBinding {
enabled = true;
}
defaultConfig {
applicationId "uniba.di.itps.ciceroneapp"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
apply plugin: 'org.sonarqube' // added for sonar qube
sonarqube {
properties {
property "sonar.projectName", "Cicerone"
property "sonar.projectKey", "Cicerone"
property "sonar.host.url", "http://localhost:9000"
property "sonar.language", "java"
property "sonar.sources", "src/main/java"
property "sonar.java.sources", "src/main/java"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.login", "admin"
property "sonar.password", "admin"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-auth:17.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.libraries.places:places-
compat:1.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-firestore:19.0.2'
implementation 'de.hdodenhof:circleimageview:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
2.build.gradle (проект):
buildscript {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-
plugin:2.6.1'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
3.gradle.wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-
all.zip