question :I think there's something wrong with it. Notice there's more than one dependencies declaration
@Jvmes Hill
answer : There is no issue in having more than dependencies declaration
Please check if following folder has any support related dependencies (like appcomat,cardview,recyclerview,support-v4) dist/projectfolder/libs folder
if there are any please remove from the libs folder
and add them in gradle entries section with version 28.0.0
Here is some useful information for you
How to resolve dependency conflict issue?
gradle is not printing proper error message in few versions
Please make following changes to dist folder to print the error with proper information
Incase of build failure with below exception
Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: Error while generating the main dex list.
or DexArchieveMerger exception
Below is the debugging procedure:
Step 1: Find which 2 Jars/Dependencies are conflicting by making below changes
These latest tools will print exactly which classes conflict and their sources/origins
Change com.android.tools.build:gradle” version to 3.4.0-alpha09' in dist/projectfolder/build.gradle in generated app
buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.4.0-alpha09' }}
Change distributionUrl in dist/projectfolder/gradle/wrapper/gradle-wrapper.properties to below one
distributionUrl=https://services.gradle.org/distributions/gradle-5.1-milestone-1-all.zip
after making changes please execute following command in dist/projectfolder
command :
gradlew assembleDebug
It will print exact classnames/jars which causing the issue
Step 2: Find from where the conflicting dependencies are pulled using below command
gradlew dependencies
Step 3: Resolving conflicts
Adopt Conflict resolution strategy, if dependency version conflicts is the reason
configurations.all {
resolutionStrategy {
force "com.android.support:design:28.0.0"
}
}
Remove if any duplicate jars or classes found in any .aar files and libs