I have seen this problem going round and I have tried downgrading the Google App Id and even tried upgrading it but nothing worked. I even checked for updates but still no luck. I am having this error where it is saying 'Missing Google App Id' when I have it implemented. Can someone help?
This is from the build.gradle(WeightTracker)
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.2.0'
}
This is from build.gradle(app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-storage'
implementation platform('com.google.firebase:firebase-bom:25.4.1')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
This is the error I keep getting:
Missing Google App Id. Please follow instructions on https://firebase.google.com/ to get a valid config file that contains a Google App Id
Related
I have the following in my app build gradle:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "com.mapbox.navigation:ui:1.4.0"
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:5.8.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'}
and have successfully run things such as a map and placing markers down etc. However, when I go to import anything from services, such as import com.mapbox.services.android.navigation.ui.v5.NavigationLauncher; Android Studio cannot find anything. I've tried different versions in case the imports I needed were deprecated but to no avail. Any ideas? All the tutorials and example code in the documentation and third-party all use these imports and I don't really see a way around them.
Thanks!
In the module-level build.gradle file, add the following dependencies:
// in addition to the rest of your build.gradle contents
// you should include the following repository and dependencies
repositories {
mavenCentral()
maven { url 'https://mapbox.bintray.com/mapbox' }
}
dependencies {
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6'
}
I want to add ads to my project but when i add the line below, it doesn't work:
implementation 'com.google.android.gms:play-services-ads:18.1.0'
these are the dependencies from the build.gradle:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
It is likely, that you might not have added the Google Services Gradle Plugin to the project, as well as the google-services.json file (which can be downloaded from the Firebase console) - and so your application fails to authenticate.
Adding the com.google.android.gms.ads.APPLICATION_ID into the AndroidManifest.xml has the same effect, because the Play Services plugin adds the values from google-services.json at build-time.
... when only using AdMob, the second option should be preferred.
Do you have inside top-level build.gradle file reference to the google() repo or to maven { url "https://maven.google.com" }? Do you have some specific error inside log?
Try to create a new project and copy old project files and paste in a new one. If it should help!
How to install lettuce library on Android studio in Gradle files ?
https://lettuce.io
is there any solution to compile the library ?
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0’
}
In the lettuce's getting started section there is a section called For Gradle Users on how to add the library from gradle. I think just adding:
implementation 'io.lettuce:lettuce-core:5.1.3.RELEASE'
would work. You must check if you must adjust your current dependencies and/or modify your proguard rules.
Hope I helped.
I wished to make floating label type of edit text. So I added this under dependencies:
implementation 'com.android.support:design:28.0.0'
Now, I am getting this error under Render Problem:
Render Problem
Failed to find style 'chipIconSize' in current theme
The above error is shown in the xml preview.
This is the dependency section in build gradle(module app) :
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
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'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.android.gms:play-services-location:16.0.0'
// implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.google.firebase:firebase-auth:16.0.4'
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.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
The logcat shows the following error and warning under Java compiler:
The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
How can I resolve the error?
The app gradle file must have a dependency on
com.google.firebase:firebase-core for Firebase services to work as
intended.
Add :
implementation 'com.google.firebase:firebase-core:16.0.4'
To your build.gradle dependencies.
For the :
Failed to find style 'chipIconSize' in current theme
It seems liek you'll need to add:
implementation 'com.google.android.material:material:1.0.0'
To support that attribute from material design or simply, remove it.
Check this link: https://material.io/develop/android/docs/getting-started/
I make new android things app with api level 24.
I got error msg during gradle build:
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.google.android.things:androidthings:1.0.
My app build.gradle looks like this:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
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'
compileOnly 'com.google.android.things:androidthings:1.0'
}
Thank you in any help.
Problem was caused by corporate proxy. Although i have setup proxy in android studio. It looks like gradle was not affected by it.
I just switched to android hotspot before start of gradle build and everything worked fine.