I am using,
Android Studio Version - 3.3.2
minSdkVersion 19
targetSdkVersion 27
Kotling plugin :
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
kotlin build file :
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
In top level build-gradle
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'
My Issue is Its giving me Lots of Kotlin Compiler Warning.
I have not issue with this warning but I want to add,
shrinkResources true
minifyEnabled true
in my application, but due to warning this giving me an error to solve warning first.
Please see my number of warning in screen shot, and if any have having solutions of it then please give ans here.
Edit
Following is my build.gradle file
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'