Android Studio 3.3.2 kotlin Предупреждение компилятора - PullRequest
1 голос
/ 11 марта 2019

Я использую,

 Android Studio Version - 3.3.2
 minSdkVersion 19
 targetSdkVersion 27

Плагин Kotling:

 apply plugin: 'kotlin-android'
 apply plugin: 'kotlin-android-extensions'
 apply plugin: 'kotlin-kapt'

Файл сборки kotlin:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

В сборке верхнего уровня

ext.kotlin_version = '1.3.21'

classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.27.1'

Моя проблема в том, что она дает мне много предупреждений компилятора Kotlin.

У меня нет проблем с этим предупреждением, но я хочу добавить,

shrinkResources true
minifyEnabled true 

в моем приложении, но из-за предупреждения это выдает ошибку, чтобы сначала устранить предупреждение.

Пожалуйста, посмотрите мой номер предупреждения на снимке экрана, и если у кого-то есть решения, то, пожалуйста, дайте здесь ответ.

enter image description here

Редактировать

Ниже приведен мой файл build.gradle

 apply plugin: 'com.android.application'
 apply plugin: 'kotlin-android'
 apply plugin: 'kotlin-android-extensions'
 apply plugin: 'io.fabric'
 apply plugin: 'kotlin-kapt'


 android {
 compileSdkVersion 27
 defaultConfig {
    applicationId "com.myapp"
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "10.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}

buildTypes {

  release {
        debuggable false
        shrinkResources true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
    }

    debug {
        debuggable true
        shrinkResources true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
    }

      compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_8
      targetCompatibility JavaVersion.VERSION_1_8
      } 

      dexOptions {
      // Prevent OutOfMemory with MultiDex during the build phase
      javaMaxHeapSize "4g"
      }

      dataBinding {
         enabled = true
      }
}

kapt {
     generateStubs = true
}



  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.android.support:design:27.1.1'
      testImplementation 'junit:junit:4.12'
       androidTestImplementation 'com.android.support.test:runner:1.0.2'

       implementation 'com.android.support:multidex:1.0.3'
       implementation 'com.intuit.sdp:sdp-android:1.0.6'
       implementation 'com.facebook.android:facebook-login:4.39.0'
       implementation 'com.amitshekhar.android:rx2-android-networking:1.0.2'

       implementation 'com.twitter.sdk.android:twitter-core:3.3.0'
       implementation 'com.twitter.sdk.android:twitter:3.3.0'
       implementation 'com.google.firebase:firebase-core:16.0.6'
       implementation 'com.google.firebase:firebase-messaging:17.3.4'
       implementation 'com.google.android.gms:play-services-location:16.0.0'
       implementation 'com.google.android.gms:play-services-places:16.0.0'
       implementation 'com.google.android.gms:play-services-base:16.0.1'
       implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'

       implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
       implementation 'com.wang.avi:library:2.1.3'

       implementation 'com.google.android.gms:play-services-maps:16.0.0'
       implementation project(':multipleimageselect')
       implementation 'com.github.bumptech.glide:glide:4.8.0'
// location
       implementation 'com.google.android.gms:play-services-location:16.0.0'
       implementation 'id.zelory:compressor:2.1.0'
       annotationProcessor 'com.android.databinding:compiler:3.1.4'

       implementation project(':library_slider')
       implementation 'de.hdodenhof:circleimageview:3.0.0'

       implementation 'com.jakewharton:butterknife:8.8.1'
       annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
       implementation 'com.flurry.android:analytics:11.5.0@aar'
       implementation 'com.google.android.libraries.places:places:1.0.0'
       implementation 'com.google.code.findbugs:jsr305:3.0.2'
       implementation 'com.braintreepayments.api:braintree:1.7.10'

 }
 apply plugin: 'com.google.gms.google-services'
...