I ran cd android ; ./gradlew assembleLocalDebug assembleAndroidTest -DtestBuildType=debug ; cd - and it failed because of Duplicate class androidx.appcompat.content.res.AppCompatResources found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
Detox version: 20.1.1
React Native version: 0.68.5
Node version: 16.14.0
Device model: Physical Device
Android version: 10
Test-runner (select one): jest
I think it has a conflict between androidx.appcompat version of detox and react-native-track-player. But I don't know how to fix it.
Any help would be appreciated!
Here is the log:
> Configure project :app
> Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
> Reading env from: .env.local
> Configure project :react-native-firebase_analytics
> :react-native-firebase_analytics package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/analytics/package.json
> :react-native-firebase_app package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/app/package.json
> :react-native-firebase_analytics:firebase.bom using default value: 31.1.1
> :react-native-firebase_analytics package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/analytics/package.json
> :react-native-firebase_analytics:version set from package.json: 16.5.0 (16,5,0 - 16005000)
> :react-native-firebase_analytics:android.compileSdk using custom value: 33
> :react-native-firebase_analytics:android.targetSdk using custom value: 33
> :react-native-firebase_analytics:android.minSdk using custom value: 23
> :react-native-firebase_analytics:reactNativeAndroidDir /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/react-native/android
> Configure project :react-native-firebase_app
> :react-native-firebase_app package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/app/package.json
> :react-native-firebase_app:firebase.bom using default value: 31.1.1
> :react-native-firebase_app:play.play-services-auth using default value: 20.3.0
> :react-native-firebase_app package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/app/package.json
> :react-native-firebase_app:version set from package.json: 16.5.0 (16,5,0 - 16005000)
> :react-native-firebase_app:android.compileSdk using custom value: 33
> :react-native-firebase_app:android.targetSdk using custom value: 33
> :react-native-firebase_app:android.minSdk using custom value: 23
> :react-native-firebase_app:reactNativeAndroidDir /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/react-native/android
> Configure project :react-native-firebase_dynamic-links
> :react-native-firebase_dynamic-links package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/dynamic-links/package.json
> :react-native-firebase_app package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/app/package.json
> :react-native-firebase_dynamic-links:firebase.bom using default value: 31.1.1
> :react-native-firebase_dynamic-links package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/dynamic-links/package.json
> :react-native-firebase_dynamic-links:version set from package.json: 16.5.0 (16,5,0 - 16005000)
> :react-native-firebase_dynamic-links:android.compileSdk using custom value: 33
> :react-native-firebase_dynamic-links:android.targetSdk using custom value: 33
> :react-native-firebase_dynamic-links:android.minSdk using custom value: 23
> :react-native-firebase_dynamic-links:reactNativeAndroidDir /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/react-native/android
> Configure project :react-native-firebase_messaging
> :react-native-firebase_messaging package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/messaging/package.json
> :react-native-firebase_app package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/app/package.json
> :react-native-firebase_messaging:firebase.bom using default value: 31.1.1
> :react-native-firebase_messaging package.json found at /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/#react-native-firebase/messaging/package.json
> :react-native-firebase_messaging:version set from package.json: 16.5.0 (16,5,0 - 16005000)
> :react-native-firebase_messaging:android.compileSdk using custom value: 33
> :react-native-firebase_messaging:android.targetSdk using custom value: 33
> :react-native-firebase_messaging:android.minSdk using custom value: 23
> :react-native-firebase_messaging:reactNativeAndroidDir /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/react-native/android
> Configure project :react-native-mmkv
> MMKV: node_modules/ found at: /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules
> WARNING:DSL element 'dexOptions' is obsolete and should be removed.
> It will be removed in version 8.0 of the Android Gradle plugin.
> Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically.
> Configure project :react-native-reanimated
> AAR for react-native-reanimated has been found
> /Users/alirezahadjar/Dropbox/Mac/Desktop/Projects/ReactNative/omp-mobile-react-native/node_modules/react-native-reanimated/android/react-native-reanimated-68-hermes.aar
> WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33
This Android Gradle plugin (7.0.4) was tested up to compileSdk = 31
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
<=============> 100% CONFIGURING [2m 57s]
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33s of :app:localDebugRuntimeClass
This Android Gradle plugin (7.0.4) was tested up to compileSdk = 31
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=33
to this project's gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33
> Task :react-native-track-player:checkDebugAndroidTestDuplicateClasses FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-track-player:checkDebugAndroidTestDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class androidx.appcompat.content.res.AppCompatResources found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$1 found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatableTransition found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedStateListState found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedVectorDrawableTransition found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimationDrawableTransition found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$FrameInterpolator found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$Transition found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$1 found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$BlockInvalidateCallback found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$DrawableContainerState found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.DrawableWrapper found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable$StateListState found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.DrawableUtils found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.ResourcesWrapper found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.TintContextWrapper found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.TintInfo found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.TintResources found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
> Duplicate class androidx.appcompat.widget.VectorEnabledTintResources found in modules appcompat-1.0.2-runtime (androidx.appcompat:appcompat:1.0.2) and jetified-appcompat-resources-1.3.1-runtime (androidx.appcompat:appcompat-resources:1.3.1)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual
The test apk should have been built successfully.
Related
I just updated the kotlin version in android/build.gradle
buildscript {
ext.kotlin_version = '1.7.21' // originally ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
and after doing this I tried to run my flutter project and it failed with this exception
`
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDevelopmentDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0-Beta (org.jetbrains.kotlin:kotlin-stdlib:1.8.0-Beta) and jetified-kotlin-stdlib-jdk8-1.5.31 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 53s
Exception: Gradle task assembleDevelopmentDebug failed with exit code 1
Things I have tried
I tried flutter clean and running pub get; and then running the project again. The same exception occurred.
I have tried deleting the .gradle folder inside the android folder after doing the above process.
I have also created a new project to check if something is wrong with my installed libraries (Android sdk, flutter sdk etc.) it ran without any error so there is no problem there.
Can someone please help.
Change kotlin version
ext.kotlin_version = '1.8.0-Beta'
I am fairly new to Kotlin and Android Studio. When I tried to add a dependency to my Android application (the dependency is json-simple) it throwed me an error with the cause as Invalid type code: 82. Gradle had synced correctly without any warnings and errors, but it throws me this error when I try to run my code. Can anyone please tell me how to remedy this issue? The stacktrace is :-
Executing tasks: [:app:assembleDebug] in project D:\PathToProj
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugKotlin
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:compileDebugJavaWithJavac
> Task :app:compileDebugSources
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:checkDebugDuplicateClasses FAILED
> Task :app:mergeDebugJavaResource
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class org.hamcrest.BaseDescription found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.BaseMatcher found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.CoreMatchers found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.Description found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.Factory found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.Matcher found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.SelfDescribing found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.StringDescription found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.AllOf found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.AnyOf found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.DescribedAs found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.Is found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsAnything found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsEqual found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsInstanceOf found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNot found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsNull found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.core.IsSame found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.internal.ArrayIterator found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValue found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Duplicate class org.hamcrest.internal.SelfDescribingValueIterator found in modules jetified-hamcrest-core-1.1.jar (org.hamcrest:hamcrest-core:1.1) and jetified-junit-4.10.jar (junit:junit:4.10)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 18s
14 actionable tasks: 4 executed, 10 up-to-date
My build.gradle is as follows:-
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.techx.voiceassist"
minSdkVersion 16
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'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
sourceCompatibility=JavaVersion.VERSION_1_8
targetCompatibility=JavaVersion.VERSION_1_8
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
I have tried all other solutions describing this particular issue. None of them worked (including executing the clean task and running again). I also tried using the lintFix task (though I don't know what that is) to fix the issue but did'nt work.
That issue is describing a dependency conflict - basically the libraries you're using are bringing in two different copies of hamcrest-core, and Gradle doesn't know which one to use.
Googling around it looks like it is json-simple that's pulling in that dependency, and also junit. I don't know a lot about this, but one solution is to add
android {
....
configurations { compile.exclude group: "junit", module: "junit"}
....
}
(so add that configurations block in your android section somewhere).
Honestly I'm not totally sure about all this - json-simple has a dependency on JUnit 4.10, and JUnit 4.11 added new Hamcrest matchers - maybe Gradle can't be sure that json-simple will work with the newer library. Excluding JUnit with that compile exclusion might make Gradle ignore it during non-test builds, I'm not sure if it will affect testing though. I'm just giving you stuff to think about if this fix doesn't work and you run into issues!
After upgrading all libraries to androidx and to the latest versions of Firebase libraries
I got error with 2 different versions of dagger java files, link in the error message doesn't work. Problem occurs at step :app:checkDebugDuplicateClasses.
I do not use dagger directly in my code, using
./gradlew app:dependencies
I found what com.google.android.gms:play-services-cast-framework:17.1.0 uses com.google.dagger:dagger:2.22, but no info about 1.2.2.
Cause 1: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class dagger.Lazy found in modules dagger-1.2.2.jar (dagger-1.2.2.jar) and dagger-2.22.jar (com.google.dagger:dagger:2.22)
Duplicate class dagger.MembersInjector found in modules dagger-1.2.2.jar (dagger-1.2.2.jar) and dagger-2.22.jar (com.google.dagger:dagger:2.22)
Duplicate class dagger.Module found in modules dagger-1.2.2.jar (dagger-1.2.2.jar) and dagger-2.22.jar (com.google.dagger:dagger:2.22)
Duplicate class dagger.Provides found in modules dagger-1.2.2.jar (dagger-1.2.2.jar) and dagger-2.22.jar (com.google.dagger:dagger:2.22)
Duplicate class javax.inject.Inject found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Duplicate class javax.inject.Named found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Duplicate class javax.inject.Provider found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Duplicate class javax.inject.Qualifier found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Duplicate class javax.inject.Scope found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Duplicate class javax.inject.Singleton found in modules javax.inject-1.jar (javax.inject-1.jar) and javax.inject-1.jar (javax.inject:javax.inject:1)
Go to the documentation to learn how to Fix dependency resolution errors.
The easiest way is to analyze dependencies.
SOLUTION #1 (console only)
Run in console:
./gradlew -q dependencies app:dependencies
After receiving list of dependencies in the console, go to Analyze part (below Solution #2).
SOLUTION #2 (generate html)
1) Add plugin to generate report
In to app/build.gradle (this with compileSdkVersion, targetSdkVersion or buildTypes), at the top add:
apply plugin: 'project-report'
near one of them:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
which are on top.
2) Generate report
Just from the console run:
./gradlew htmlDependencyReport
or from Android Studio
Tasks > other > htmlDependencyReport
3) Open report
In console you will find URL:
./gradlew htmlDependencyReport
> Task :app:htmlDependencyReport
See the report at: file:///Users/user_name/your_path/project_name/app/build/reports/project/dependencies/index.html
And go to the project ':app'
4) Analyze report
After clicking each of the position there are dependencies:
To expand all of them, you can in develper console such code:
$('#dependencies').html(function(index, html) {
return html.split('style="display: none;"')
.join('style="display: block;"')
.split('<h3 class="closed">')
.join('<h3>')
});
ANALYZE
1) Find old dependencies
In your case you are searching phrase dagger:1
Or in the console:
2) Exlude dependencies
Find in the report library name, and just exclude group from this import.
In your build.gradle (where you have all of dependencies) modify "problematic" library excluding dagger v1.
For example:
implementation("some.old.library.using.dagger1:1.0.0") {
exclude group: 'com.squareup.dagger', module: 'dagger'
}
I have recently updated my Android studio to 3.4.1. I am planning to integrate Geofencing Application. So I have downloaded the Map Application from the Google sample git repository and import it to new Android studio. But I am getting the below error continuously while building the application.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules classes.jar (androidx.core:core:1.0.1) and classes.jar (com.android.support:support-compat:26.1.0)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 18s
16 actionable tasks: 12 executed, 4 up-to-date
Now i'm trying to run clone app from git
https://github.com/frinder/frinder-app
This
but the problem is that app made pretty long time ago so should to
change bulid.gradle
but when i try to same sync
implementation "com.android.support:animated-vector-drawable:28.0.0"
but if i delete it keep going show to me error
28.0.0
It show like this
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:27.0.2 more...
but i don't know what makes not exact same version
This is that app build.gradle (Module)
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.28.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://maven.google.com/" }
mavenCentral()
}
ext {
supportLibVersion = '28.0.3' // variable that can be referenced to keep support libs consistent
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.frinder.frinder"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
dev {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// Based on https://stackoverflow.com/questions/34251441/commiting-google-services-json-to-github
def build_param = "${build}";
if (build_param != "dev") {
//exclude production build
android.variantFilter { variant ->
if (variant.buildType.name.equals('dev')) {
variant.setIgnore(true);
}
}
} else {
//exclude all except production build
android.variantFilter { variant ->
if (!variant.buildType.name.equals('dev')) {
variant.setIgnore(true)
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true
}
implementation "com.android.support:animated-vector-drawable:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:cardview-v7:28.0.0"
implementation "com.android.support:customtabs:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation "com.android.support:recyclerview-v7:28.0.0"
implementation 'com.android.support.constraint:constraint-layout:28.0.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.facebook.android:facebook-login:4.42.0'
implementation 'com.facebook.android:facebook-places:4.42.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.firebase:firebase-firestore:20.1.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.firebase:geofire-android:2.1.2'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'org.parceler:parceler-api:1.1.6'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'org.apmem.tools:layouts:1.10#aar'
implementation 'com.github.stfalcon:chatkit:0.2.2'
testImplementation 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
annotationProcessor 'org.parceler:parceler:1.1.6'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
}
apply plugin: 'com.google.gms.google-services'
This is that app build.gradle (Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.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 {
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Manifest file here
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.frinder.frinder">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<application
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString"
android:allowBackup="true"
android:icon="#drawable/ic_icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".activity.MainActivity"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="18312e191b37bec3700f47ecf214e9c79a589efb" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name=".activity.LoginActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity android:name=".activity.DiscoverActivity" />
<activity android:name=".activity.NotificationsActivity" />
<activity android:name=".activity.EditProfileActivity" />
<activity android:name=".activity.MessagesListActivity" />
<activity android:name=".activity.MessageDetailActivity" />
</application>
</manifest>
Error logcat
ERROR: Failed to resolve: com.android.support.constraint:constraint-layout:28.0.0
Show in Project Structure dialog
Affected Modules: app
It makes Sync Failed
I want to solve the problem...
New Error When i run
Executing tasks: [:app:assembleDebug]
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:buildInfoDebugLoader
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:writeDebugApplicationId UP-TO-DATE
> Task :app:processDebugGoogleServices
Parsing json file: C:\Users\bon300-36\AndroidStudioProjects\frinder-app\app\src\debug\google-services.json
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:processDebugManifest
> Task :app:fabricGenerateResourcesDebug UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources
> Task :app:javaPreCompileDebug
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources
warn: removing resource com.frinder.frinder:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac
Gradle may disable incremental compilation as the following annotation processors are not incremental: butterknife-compiler-8.4.0.jar (com.jakewharton:butterknife-compiler:8.4.0), parceler-1.1.6.jar (org.parceler:parceler:1.1.6), auto-service-1.0-rc2.jar (com.google.auto.service:auto-service:1.0-rc2).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
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.
> Task :app:instantRunMainApkResourcesDebug
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:signingConfigWriterDebug UP-TO-DATE
> Task :app:processInstantRunDebugResourcesApk
> Task :app:checkDebugDuplicateClasses FAILED
> Task :app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.graphics.drawable.IconCompatParcelizer found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.core.internal.package-info found in modules classes.jar (androidx.core:core:1.0.0) and classes.jar (com.android.support:support-compat:28.0.0)
Duplicate class androidx.versionedparcelable.CustomVersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.NonParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelField found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelImpl$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.ParcelUtils found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$1 found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcel$ParcelException found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelParcel found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$FieldBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelStream$InputBuffer found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelable found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Duplicate class androidx.versionedparcelable.VersionedParcelize found in modules classes.jar (androidx.versionedparcelable:versionedparcelable:1.0.0) and classes.jar (com.android.support:versionedparcelable:28.0.0)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 19s
25 actionable tasks: 11 executed, 14 up-to-date
After i Update AndroidX NEW Error
Executing tasks: [:app:assembleDebug]
> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:buildInfoDebugLoader
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:writeDebugApplicationId UP-TO-DATE
> Task :app:processDebugGoogleServices
Parsing json file: C:\Users\bon300-36\AndroidStudioProjects\frinder-app\app\src\debug\google-services.json
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:processDebugManifest
> Task :app:fabricGenerateResourcesDebug UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources
> Task :app:javaPreCompileDebug FAILED
> Task :app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
> Could not resolve all files for configuration ':app:debugAnnotationProcessorClasspath'.
> Failed to transform artifact 'parceler.jar (org.parceler:parceler:1.1.6)' to match attributes {artifactType=processed-jar, org.gradle.usage=java-runtime-jars}
> Execution failed for JetifyTransform: C:\Users\bon300-36\.gradle\caches\modules-2\files-2.1\org.parceler\parceler\1.1.6\52c727f86dc1b805eb5c7ee8a5d13824be4b1ff1\parceler-1.1.6.jar.
> Failed to transform 'C:\Users\bon300-36\.gradle\caches\modules-2\files-2.1\org.parceler\parceler\1.1.6\52c727f86dc1b805eb5c7ee8a5d13824be4b1ff1\parceler-1.1.6.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.v4.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
16 actionable tasks: 5 executed, 11 up-to-date
Version that you have defined for constraint layout is not available. Use the one shown below.
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
More information is given in the link below
Constraint Layout
Use
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
There is no version 28