Failed to resolve: com.google in Android Studio 3.1.3 - android

Adding Firebase dependencies is giving below error:
Failed to resolve: com.google
This is my app/build.gradle
`
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxxxxxx.xxxxx"
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-alpha3'
implementation 'com.google.firebase: firebase-core: 16.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}
apply plugin: 'com.google.gms.google-services'
`
I referred to "Failed to resolve: com.google.firebase:firebase-core:9.0.0" but, didn't worked.
Thank you in advance.

Check this line implementation 'com.google.firebase: firebase-core: 16.0.0'
You have a space between com.google.firebase: and firebase-core:16.0.0. Remove those spaces

Related

I have a problem when I connect the application with firebase

The first picture
second picture
This message is the problem
Failed to resolve: firebase-auth-15.0.0
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.toshiba.myphone"
minSdkVersion 15
targetSdkVersion 27
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:27.1.1'
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-auth:16.0.1:15.0.0'
}
Can you help? thank you
Follow this
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.toshiba.myphone"
minSdkVersion 15
targetSdkVersion 27
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:27.1.1'
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-auth:16.0.1'
}
apply plugin: 'com.google.gms.google-services'
Update gradle and firebase versions as required.
'com.google.firebase:firebase-auth:16.0.1:15.0.0' Make it
'com.google.firebase:firebase-auth:16.0.1' Or anything that is compatible with your gradle.

Failed to resolve: com.google.android.gms:play-services-maps:15.6.1 Install Repository and sync project Show in File Show in Project Structure dialog

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.deegi.lab10"
minSdkVersion 15
targetSdkVersion 27
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'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-maps:15.6.1'
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'
}
this is sync errror : Failed to resolve: com.google.android.gms:play-services-maps:15.6.1
build error: Could not find com.google.android.gms:play-services-maps:15.6.1.
Searched in the following locations:
my emulator play services version is : 11.3.02
It happens because com.google.android.gms:play-services-maps:15.6.1 doesn't exist.
Use:
com.google.android.gms:play-services-maps:15.0.1

Updating to couchbase lite 2.0.0 causing cannot resolve symbol errors

I am trying to update from couchbase.lite 1.4.0 to 2.0.0, but when I update and sync my build.gradle file I seem keep getting 'cannot resolve symbol' errors for my imports (AndroidContext, Document, and Database). After looking at the dcoumentation, it appears that all I have change change is:
implementation 'com.couchbase.lite:couchbase-lite-android:1.4.0'
to
implementation 'com.couchbase.lite:couchbase-lite-android:2.0.0'
unless I missed something else...
Here is my complete build.grade file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.my.app"
minSdkVersion 19
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: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.couchbase.lite:couchbase-lite-android:2.0.0'
implementation 'com.couchbase.lite:couchbase-lite-android-forestdb:1.4.1'
}

Error implementing Material Design in Android

I've been reading over the new material design website but I'm having an issue implementing it.
The application I'm currently working in is a simple test applications with nothing more than a button and some textviews.
The problem comes after placing implementation 'com.google.android.material:material:1.0.0-alpha1' in the gradle file.
heres my build.gradle(app) file
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.user.firebasemessagingtest"
minSdkVersion 19
targetSdkVersion 27
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'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout: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.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.2'
implementation 'com.google.firebase:firebase-ml-vision:15.0.0'
implementation 'com.google.android.material:material:1.0.0-alpha1'
}
apply plugin: 'com.google.gms.google-services'
I've got 4 errors,
error: resource android:attr/dialogCornerRadius not found.
error: resource android:attr/fontVariationSettings not found.
error: resource android:attr/ttcIndex not found.
error: failed linking references.
I have included the maven in the project gradle file like stated in the documentation.
Try this
change compileSdkVersion and Support Libraries version
compileSdkVersion 'android-P'
Support Libraries to '28.0.0-alpha1'
and use
api 'com.android.support:design:28.0.0-alpha1'
EDIT
Update your SDK Platform update - Android P Preview (latest)
and also make targetSdkVersion 'P'
Than Clean-Re_Build-Run your project
EDIT 2
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-P'
defaultConfig {
applicationId "com.example.nilesh.testapp"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
compile 'com.android.support:design:28.0.0-alpha1'
compile 'com.android.support:cardview-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.material:material:1.0.0-alpha1'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.2'
implementation 'com.google.firebase:firebase-ml-vision:15.0.0'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
repositories {
mavenCentral()
}
Hope this helps
Set compileSdkVersion as 'android-P'.Match the support library with the compileSdkVersion. For instance, implementation 'com.android.support:support-v4:28.0.0-alpha1' instead of implementation 'com.android.support:appcompat-v7:27.1.1'.
Replace implementation 'com.google.android.material:material:1.0.0-alpha1' with api 'com.android.support:design:28.0.0-alpha1'.
The app build.gradle should look something like this.
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 'android-P'
defaultConfig {
applicationId "com.wolfrevokcats.myapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 16
versionName "2.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable false
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
api 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation ('com.someone.addons:library:1.6.1#aar'){
exclude group: 'com.android.support'
exclude module: 'appcompat-v7'
exclude module: 'support-v4'
}
implementation 'com.google.android.gms:play-services-location:15.0.1'
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'
}
As 'com.android.support:design:28.0.0-alpha1' is being used, our code will have to change to android.support.design instead of com.google.android.material libraries. Here's an example using the new Bottom App Bar widget.
<android.support.design.bottomappbar.BottomAppBar
android:id="#+id/toolbar"
style="#style/Widget.MaterialComponents.BottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAttached="true"
app:fabAlignmentMode="center"/>

Failed to resolve: redstone.xmlrpc:xnlrpc:1.1.1

I am attempting to build an android app that uses the wordpress-java Lib to obtain the data from my site.
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.techedelicminds.techedelicminds"
minSdkVersion 19
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 'net.bican:jwordpress:0.7.0'
}
As you can see I have the correct compile code in my build.gradle yet the Error "Failed to resolve: redstone.xmlrpc:xmlrpc:1.1.1" continues to show up, and despite my best efforts I can not find anyone else on the internet that has run into this issue, any help would be appreciated.

Categories

Resources