Am getting error during build, if am using compileSdkVersion 30
, targetSdkVersion 30
and buildToolsVersion = '30.0.0'
. The error doesn't stop my app from running but I think it might crash on production. Please anyone have an idea how to can fix this instead of using compileSdkVersion 29
?
I checked online but from other question I see, I couldn't see the steps in my Android Studio 4.0 on Macbook. I also tried changing to sourceCompatibility JavaVersion.VERSION_1_9 targetCompatibility JavaVersion.VERSION_1_9
, but I got so many error.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/client/BasicCookieStore.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/cookie/BasicClientCookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/client/BasicCookieStore.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/cookie/BasicClientCookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/client/BasicCookieStore.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/impl/cookie/BasicClientCookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/build-tools/30.0.0/core-lambda-stubs.jar(java/lang/invoke/LambdaMetafactory.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/cookie/SetCookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/cookie/Cookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/cookie/ClientCookie.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
warning: /Users/pc/Library/Android/sdk/platforms/android-30/optional/org.apache.http.legacy.jar(org/apache/http/client/CookieStore.class): major version 53 is newer than 52, the highest major version supported by this compiler. It is recommended that the compiler be upgraded.
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 11 warnings
My Gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 30
//compileSdkVersion 29
buildToolsVersion "30.0.0"
//buildToolsVersion = '29.0.3'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.myapp.android"
minSdkVersion 19
targetSdkVersion 30
//targetSdkVersion 29
versionCode 12
versionName "2.0.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
debug {
storeFile file('/Users/key.keystore')
storePassword 'HJJ'
keyPassword 'KK'
keyAlias = 'V'
}
release {
storeFile file('/Users/key.keystore')
storePassword 'HJJ'
keyPassword 'KK'
keyAlias = 'V'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets']
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.3.0'
implementation 'androidx.navigation:navigation-ui:2.3.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'org.apache.httpcomponents:httpcore:4.4.13'
implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
implementation 'com.google.android.gms:play-services-safetynet:17.0.0'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
implementation 'com.google.firebase:firebase-config:19.1.4'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-analytics:17.4.3'
implementation 'com.google.firebase:firebase-crashlytics:17.1.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
//implementation "com.squareup.okhttp3:okhttp:3.11.0"
implementation 'com.squareup.okhttp3:okhttp:3.13.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.fenchtose.nocropper:nocropper:0.3.0'
implementation 'com.android.volley:volley:1.1.1'
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
implementation 'com.github.stfalcon:frescoimageviewer:0.5.0'
implementation 'com.facebook.fresco:fresco:2.1.0'
implementation 'org.jsoup:jsoup:1.11.1'
implementation 'com.braintreepayments.api:braintree:2.22.0'
//implementation 'com.braintreepayments.api:braintree:3.12.0'
}