Could not create task ':app:minifyReleaseWithR8' - java

Hello i am trying export old project in my. android studio version Android Studio 4.2.1
Build #AI-202.7660.26.42.7351085, built on May 10, 2021
when i try compiling my code i am getting this error any one know how fixed this issue
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not create task ':app:minifyReleaseWithR8'.
Cannot query the value of this provider because it has no value available
i already tried this solution but not working Could not create task ':app:minifyReleaseWithR8'. Cannot query the value of this provider because it has no value available
here is my build.gradle file
buildscript {
repositories {
google()
maven { url 'https://plugins.gradle.org/m2/' }
}
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
id 'com.android.application'
id 'com.google.gms.google-services'
}
repositories {
maven {
url "https://maven.google.com"
}
}
android {
compileSdkVersion 30
buildToolsVersion '31.0.0-rc3'
defaultConfig {
applicationId "com.example.status"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
}
task wrapper(type: Wrapper) {
gradleVersion = '6.7.1'
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes.each {
it.buildConfigField 'String', 'My_api', app_url
}
lintOptions {
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.4.0-alpha03'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.google.android.exoplayer:exoplayer:2.15.0'
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'
implementation 'com.google.android.gms:play-services-ads:20.2.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.8'
implementation 'com.onesignal:OneSignal:4.4.0#aar'
implementation 'com.google.firebase:firebase-analytics:19.0.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'io.github.lizhangqu:coreprogress:1.0.2'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.chaos.view:pinview:1.4.2'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.MasayukiSuda:Mp4Composer-android:v0.4.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'com.facebook.android:facebook-login:5.15.3'
implementation 'com.facebook.android:audience-network-sdk:6.5.1'
implementation 'com.google.ads.mediation:facebook:6.5.1.1'
implementation 'com.github.duanhong169:colorpicker:1.1.6'
implementation "com.hootsuite.android:nachos:1.2.0"
implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'org.jetbrains:annotations:16.0.1'
implementation project(path: ':Wheel')
implementation project(path: ':SmoothCheckBox-master')
implementation project(path: ':IRBottomNavigationLib')
}

Related

Could not find com.mapbox.navigator:mapbox-navigation-native:6.2.1. & com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.0 etc

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not find com.mapbox.navigator:mapbox-navigation-native:6.2.1.
Required by:
project :app
project :app > com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.0
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.moveitdriver"
minSdkVersion 21
targetSdkVersion 30
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 JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:30.0.0'
implementation 'com.android.support:design:30.0.0'
implementation 'com.android.support:support-compat:30.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:support-v4:30.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'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
// Circular Image Dependency
implementation 'de.hdodenhof:circleimageview:3.0.0'
// Country Flag
implementation 'com.hbb20:ccp:2.2.3'
// OTP Pin Box View
implementation 'com.chaos.view:pinview:1.4.2'
// Online Image Loading library
implementation 'com.squareup.picasso:picasso:2.71828'
// EditText Layout Dependency
implementation 'me.zhanghai.android.materialedittext:library:1.0.5'
// Dependency Of Getting Permissions
implementation 'com.nabinbhandari.android:permissions:3.8'
// Responsive Layouts Dependencies
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.intuit.ssp:ssp-android:1.0.4'
// Retrofit Dependencies
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
// Socket Dependencies
implementation 'com.github.nkzawa:socket.io-client:0.3.0'
// Stripe Payment Method Dependency
implementation 'com.stripe:stripe-android:6.1.2'
// MapBox Navigation Dependency
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.4.0'
implementation 'com.mapbox.navigator:mapbox-navigation-native:6.2.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.0'
// implementation 'com.mapbox.navigation:android:2.6.0'
// implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:8.4.0') {
// exclude group: 'group_name', module: 'module_name'
// }
// implementation "com.mapbox.navigation:ui-dropin:2.6.0"
//implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.0'
implementation 'com.jakewharton:butterknife:8.0.1'
//implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
}

How can I solve Python.getInstance() error when I use chaquopy in android studio

I'm trying to use chaquopy in android studio to recognize audio from video and convert it to text, but when I call Python.getInstance() it overlines it in red. what can be the problem ?.
build.gradle(app)
plugins {
id 'com.google.gms.google-services'
//for chaquopy(python)
id 'com.android.application'
id 'com.chaquo.python'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.talhakara.uzaktanegitimbitirmeprojesi"
minSdk 16
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// for chaquopy(python)
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
python {
buildPython "C:/Users/enest/AppData/Local/Programs/Python/Python39/python.exe"
}
sourceSets {
main {
python.srcDir "src/main/python"
}
}
//
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
dataBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'com.google.android.gms:play-services-tasks:17.2.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-core:20.1.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.firebase:firebase-invites:17.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.firebase:firebase-firestore:24.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation ('org.jitsi.react:jitsi-meet-sdk:2.9.0') { transitive = true }
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
// implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
}
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
//chaquopy
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
//chaquopy
classpath "com.chaquo.python:gradle:10.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
my activity
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityVideoConferenceBinding.inflate(getLayoutInflater());
View view = binding.getRoot();
setContentView(view);
//start python
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(VideoConference.this));
}
Python py = new Python.getInstance(); // this line is red and
//it doesn't show any errors
binding.btnChooseVideo.setOnClickListener(view1 -> {
callChooseFromVideo();
});
}
error message
error: cannot find symbol
Python py = new Python.getInstance();
symbol: class getInstance
location: class Python
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details
Could it be a problem with gradle versions? because my gradle version 7.0.4 is showing 7.0 as the latest in chaquopy's docs. can it cause this problem and I am using 10.0.1 as the chaquopy version because android studio recommended it as the latest version. If these are a problem, which versions should I use?
The correct syntax is just Python.getInstance(), not new Python.getInstance().

No signature of method: build_1upy3e43ytufmh38cj8qq5tbo.android() is applicable for argument types: (build_1upy3e43ytufmh38cj8qq5tbo$_run_closure1)

I have an error while building gradle in build.gradle(app) and spent several hours finding solution :
No signature of method: build_1upy3e43ytufmh38cj8qq5tbo.android() is applicable for argument types: (build_1upy3e43ytufmh38cj8qq5tbo$_run_closure1) values: [build_1upy3e43ytufmh38cj8qq5tbo$_run_closure1#6871bd16]
my build.gradle(app) file is:
android {
packagingOptions {
resources {
excludes += ['AndroidManifest.xml']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "app.code.example"
minSdkVersion 16
targetSdkVersion 31
versionCode 646
versionName "5.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
android.defaultConfig.vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//signingConfig signingConfigs.release
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
incremental true
}
lint {
checkReleaseBuilds false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-ads:20.5.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.firebase:firebase-core:20.1.0'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-database:20.0.3'
//implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.firebase:firebase-storage:20.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.google.android.gms:play-services-ads:20.5.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-iid:21.1.0'
implementation 'com.github.HotBitmapGG:RingProgressBar:V1.2.3'
implementation 'com.google.firebase:firebase-inappmessaging-display:20.1.1'
implementation 'com.google.firebase:firebase-analytics:20.1.0'
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:26.1.0')
// Declare the dependencies for the Dynamic Links and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-dynamic-links'
implementation 'com.github.dimorinny:floating-text-button:0.0.4'
//implementation 'com.facebook.android:audience-network-sdk:5.1.0'
//implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
//implementation project(path: ':sinch-android-rtc-3.17.4')
//implementation(name:'sinch-android-rtc' , version :'3.17.4' , ext:'aar')
implementation 'com.facebook.android:facebook-share:7.1.0'
implementation 'com.facebook.android:facebook-applinks:7.1.0'
implementation 'com.facebook.android:facebook-login:8.1.0'
implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
implementation 'com.facebook.android:audience-network-sdk:5.10.0'
implementation 'com.google.firebase:firebase-firestore:24.0.1'
implementation 'com.google.firebase:firebase-crashlytics:18.2.8'
implementation 'com.android.billingclient:billing:4.0.0'
implementation 'com.google.android.play:core:1.10.3'
implementation 'com.github.Jay-Goo:RangeSeekBar:v3.0.0'
implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.4.0'
implementation 'me.bendik.simplerangeview:simplerangeview:0.2.0'
implementation 'com.github.iwgang:countdownview:2.1.6'
implementation 'com.airbnb.android:lottie:3.6.1'
implementation 'com.hbb20:ccp:2.4.4'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:7.1.1'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:7.1.1'
implementation 'android.arch.paging:runtime:1.1.1'
implementation 'com.opentok.android:opentok-android-sdk:2.18.1'
implementation 'pub.devrel:easypermissions:3.0.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.cloudrail:cloudrail-si-android:2.6.5'
implementation "androidx.multidex:multidex:2.0.1"
implementation "org.florescu.android.rangeseekbar:rangeseekbar-library:0.4.0"
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
Can anyone help me find solution?
Thanks
I found the solution is removing:
dexOptions {
incremental true
}
lint {
checkReleaseBuilds false
}

Duplicate class okhttp3.internal.ws.RealWebSocket found in modules jetified-okhttp-3.12.0 and jetified-okhttp-ws-3.4.1

I have a depeendency error like
Duplicate class okhttp3.internal.ws.RealWebSocket found in modules jetified-okhttp-3.12.0 (com.squareup.okhttp3:okhttp:3.12.0) and jetified-okhttp-ws-3.4.1 (com.squareup.okhttp3:okhttp-ws:3.4.1)
I'm using WebSocket and LoggingInterceptor and implemented both dependencies,
My build.gradle below
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.mrrights.harvestoperator"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
aaptOptions { cruncherEnabled = false }
signingConfig signingConfigs.release
multiDexEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
dependencies {
//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
//ui
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.work:work-runtime:2.4.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
implementation "androidx.cardview:cardview:1.0.0"
//google map & location
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'
implementation 'com.google.android.libraries.places:places:2.4.0'
implementation 'com.google.maps.android:maps-utils-ktx:2.2.0'
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:26.1.0')
// Firebase Messaging Service
implementation 'com.google.firebase:firebase-messaging-ktx'
// Firebase Analytics for Logs in server side
implementation 'com.google.firebase:firebase-analytics-ktx'
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth-ktx'
// FirebaseUI (for authentication)
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
//firebase firestore
implementation 'com.google.firebase:firebase-firestore-ktx'
//firebase storage
implementation 'com.google.firebase:firebase-storage-ktx'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:7.1.1'
implementation 'com.firebaseui:firebase-ui-storage:4.1.0'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.firebase:firebase-crashlytics:17.3.1'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.android.support:cardview-v7:28.0.0'
//Testing
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//image view with URl
implementation 'com.squareup.picasso:picasso:2.71828'
//coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
//steps view
implementation 'com.shuhart.stepview:stepview:1.5.1'
//datePicker
implementation 'com.vivekkaushik.datepicker:datePickerTimeline:0.0.4'
//Retrofit, Interceptor, Json to Gson converter
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.4.1"
implementation 'com.squareup.retrofit2:converter-jackson:2.1.0'
// PhilJay MPAndroidChart
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
//PhotoView
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
annotationProcessor 'androidx.annotation:annotation:1.1.0'
//Circle Image View
implementation 'de.hdodenhof:circleimageview:3.1.0'
}
help me to resolve the issue,
Thank You !
You must use a single consistent version of all com.squareup.okhttp3 dependencies. Upgrade to 3.12.13
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.12.13"
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.12.13"

Duplicate zip entry [241.jar:android/support/design/widget/CoordinatorLayout$Behavior.class] [duplicate]

This question already has answers here:
Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]
(4 answers)
Closed 4 years ago.
When I'm creating an APK I get such an error:
Caused by: java.lang.RuntimeException: java.io.IOException: Can't write [C:\Users\Smokie\Desktop\datemeet\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Smokie\Desktop\datemeet\app\build\intermediates\transforms\desugar\debug\241.jar(;;;;;;**.class)] (Duplicate zip entry [241.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
my build.gradle file :
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
buildscript {
repositories {
maven { url "https://github.com/omadahealth/omada-nexus/raw/master/release" }
maven { url "https://jitpack.io" }
}
dependencies {
}
}
android {
signingConfigs {
config {
}
}
lintOptions {
abortOnError false
}
dataBinding {
enabled = true
}
compileSdkVersion 27
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.oxyn.datemeet"
minSdkVersion 17
targetSdkVersion 27
versionCode 5
versionName "1.0"
testInstrumentationRunner"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
ext.enableCrashlytics = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
ext.enableCrashlytics = true
proguardFiles 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/**'
exclude 'META-INF/**'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
jcenter()
}
android {
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// Navigation Drawer Library
compile('com.mikepenz:materialdrawer:5.3.0#aar') {
transitive = true
}
//Google, Inc (Play services) Libraries
implementation 'com.google.android.gms:play-services-places:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-config:11.8.0'
implementation 'com.google.firebase:firebase-appindexing:11.8.0'
implementation 'com.google.android.gms:play-services-appinvite:11.8.0'
//Google, Inc (Firebase) Libraries
implementation 'com.firebase:firebase-jobdispatcher:0.6.0'
implementation 'com.firebaseui:firebase-ui-database:2.3.0'
implementation 'com.firebase:geofire-android:2.1.2'
// Google, Inc (Support) Libraries
implementation 'com.android.support:support-v13:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.android.support:palette-v7:27.0.2'
implementation 'com.android.support:support-vector-drawable:27.0.2'
// Facebook, Inc SDKs
implementation 'com.facebook.android:facebook-android-sdk:4.29.0'
// Libraries for images
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.lorentzos.swipecards:library:1.0.9'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.vanniktech:emoji-twitter:0.5.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.github.yalantis:ucrop:2.2.1'
implementation 'com.github.jkwiecien:EasyImage:1.3.1'
implementation 'jp.wasabeef:picasso-transformations:2.1.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
// Location Helper Library
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
// Time library
implementation 'joda-time:joda-time:2.9.9'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.flipboard:bottomsheet-core:1.5.3'
implementation 'com.flipboard:bottomsheet-commons:1.5.3'
implementation 'com.greysonparrelli.permiso:permiso:0.3.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
implementation 'com.airbnb.android:lottie:2.2.5'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
I'm using Android Studio 3.1
when I updated the libraries: import static com.google.android.gms.internal.zzahn.runOnUiThread; the code is failing.
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
error: cannot find symbol static runOnUiThread
I Changed Android Studio Version 2.3.3. Now Perfectly works.
You might have the jar in your libs folder. Please check, if it is there, then remove it ,and clean and build it again.
I have same Error in recent Days i solved to changing the support library version
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'

Categories

Resources