I am building a Login-Register app on Android Studio. When i try to import the package android.support.design.widget it does not recognize it. I searched for a solution on other posts and they say to add some "compile" lines on build.gradle. I did it but nothing works.
Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.thomas.medicalappointmentorganization"
minSdkVersion 23
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.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'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
}
What am i doing wrong?
Please remove this line
implementation 'com.android.support:appcompat-v7:26.1.0'
Use this one:
implementation 'com.google.android.material:material:1.4.0'
Instead of:
compile 'com.android.support:design:26.1.0'
Related
I know GeoDataClient can be import by adding 'com.google.android.gms:play-services-places' in build.gradle.
But Google say "'com.google.android.gms:play-services-places'is deprecated".
So we have to use 'com.google.android.libraries.places:places:1.1.0'.
By the way 'com.google.android.libraries.places:places:1.1.0' doesn't contain GeoDataClient and PlaceDetectionClient.
How could I resolve those two objects?
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.fuckingtest"
minSdkVersion 21
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 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.libraries.places:places:1.1.0'
}
add to dependencies in build.gradle
implementation 'com.google.android.libraries.places:places-compat:1.1.0'
instead of
implementation 'com.google.android.libraries.places:places:1.1.0'
I'm working on an App in Android Studio, past 10 minutes I ran it and it works, but now I got this. I got and error at
implementation 'com.android.support:appcompact-v7:28.0.0'
Can you please tell me what should I modify?
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.quizonwheels.quizonwheels"
minSdkVersion 21
targetSdkVersion 28
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:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.volley:volley:1.1.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.github.ViksaaSkool:AwesomeSplash:v1.0.0'
}
The AwesomeSplash library is using v23 of the support library.
Change the implementation to:
implementation ('com.github.ViksaaSkool:AwesomeSplash:v1.0.0') {
exclude group: "com.android.support"
}
Have the error:
"Program type already present: android.support.v4.app.BackStackState$1"
I have tried almost every solution present here but nothing seems to be working.
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.sebastian.yumscollection"
minSdkVersion 15
targetSdkVersion 28
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'])
This line is the problem and using customtabs as well doesn't work
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:customtabs: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 'com.google.firebase:firebase-core:10.0.0'
implementation 'com.google.firebase:firebase-database:10.0.0'
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
}
apply plugin: 'com.google.gms.google-services'
If I try to sync my app in Android Studio I get the follwing error message:
Failed to resolve: com
Show in File
If I click on "Show in File" my build.gradle opens and my cursor is on the first line.
This is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "de.vertretungsplan"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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:gridlayout-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.a ndroid.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
compileOnly 'org.projectlombok:lombok:1.16.20'
annotationProcessor 'org.projectlombok:lombok:1.16.20'
implementation 'com.itextpdf:itextpdf:5.5.13'
implementation 'com.turki-alkhateeb:materialcolorpicker:1.0.7'
}
I hope somebody can help me.
Thanks you very much!
Remove the added space in this line:
androidTestImplementation 'com.a ndroid.support.test:runner:1.0.2'
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.mansi.mymini"
minSdkVersion 18
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'])
compile 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-firestore:11.8.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 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
}
facing problem at compile 'com.android.support:appcompat-v7:27.1.1'
Change compileSdkVersion to 27.
Always "com.android.support" dependency must have the same version as compileSdkVersion.. that is implementation 'com.android.support:appcompat-v7:27.1.1' & compileSdkVersion 27 in your case