A lot of people had the same error and most of their solutions worked, but not for me. I just can't see to run the code.
I tried clean/rebuild, multiDexEnabled true, I also tried tweaking the .gradle file which I just don't understand.
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.qrbarcodescanner"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'me.dm7.barcodescanner:zxing:1.9'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
}
I just want to get rid of the pesky Task :app:transformClassesWithMultidexlistForDebug FAILED error. Any help will be appreciated. Thank you
Related
I wont to implement this design library to my project > https://developer.android.com/topic/libraries/support-library/packages.html#design (com.android.support:design:28.0.0). But when I'm syncing I have got error: Could not get unknown property 'com' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Please help. Thanks :)
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.pyramid"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
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 'com.android.support.design:28.0.0'
Ok I think it is solved. I just copied all libraries from second project with Bottom Navigation Activity to my first project. com.google.android.material.bottomnavigation.BottomNavigationView It's all :)
I am new to Android studio. I am facing a problem with the coding part. While running the code it shows an error.
Thw gradle part is shown below
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.fallprediction"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
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 'android.support:support.v7:29.0.2'
}
The error is
ERROR: Failed to resolve: android.support:support.v7:29.0.2
Show in Project Structure dialog
Affected Modules: app
Please help me to resolve this error
Convert this into androidx or remove this dependency implementation 'android.support:support.v7:29.0.2
I'm trying to use selendroid in my app as webscraper, but I get this error "More than one file was found with OS independent path 'README.md'" .
Any thoughts on how to fix it?
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "ru.startandroid.testselenium2"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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 files('D:\\chromedriver\\selendroid-client-0.17.0.jar')
implementation files('D:\\chromedriver\\selendroid-standalone-0.17.0-with-dependencies.jar')
}
Add this to your android closure:
packagingOptions {
exclude 'README.md'
}
My question is about an error in Android Studio.
Every time when i try to run a java project in Android Studio i get the below error and my program doesn't not work :
This is my gradle configuration:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.christianmastracco.jsondemo"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
}
How i can solve it? Thanks
Change your compileSdkVersion and targetSdkVersion to 27 and this:
implementation 'com.android.support:appcompat-v7:26.1.0'
to this
implementation 'com.android.support:appcompat-v7:27.1.0'
Update your compileSdkVersion and targetSdkVersion, both, into version 27 and implementation version 27.1.1 as shown in error message.
I can't comment at Ernest Zamelczyk answer (reputation 50) but I think the correct answer is 27.1.1, not 27.1.0 as he told.
I had changed build.gradle from minSdkVersion 19 to be minSdkVersion 10, but when I try to install it on my emulator running android Kitkat, its not working and the app just show the application has stopped.. I tried installing it on Lollipop where its working as intended. what should I do?
here's my code
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "app.example.com"
minSdkVersion 10
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-ads:11.0.4'
}