I'm creating a Uber-like app. So you can imagine the user will be able to log in using facebook/google/firebase for those using phone numbers.
The code is fine as it was used before, however I lost the previous project's gradle settings. as such now I am faced with error message
error: cannot access zzbgl class file for com.google.android.gms.internal.zzbgl not found
please help me.
I have isolated the problem. if I delete all firebase related codes, I wouldnt have this issue.
FirebaseAuth, FirebaseUser etc.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.sunshinetechie.gethitched"
minSdkVersion 21
targetSdkVersion 27
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'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
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.facebook.android:facebook-android-sdk:4.15.0'
implementation 'com.google.http-client:google-http-client-android:+'
implementation 'com.google.api-client:google-api-client-android:+'
implementation 'com.google.api-client:google-api-client-gson:+'
implementation "com.android.support:appcompat-v7:26.1.0"
implementation 'com.google.android.gms:play-services-maps:11.0.2'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.libraries.places:places-compat:1.1.0'
}
apply plugin: 'com.google.gms.google-services'
Related
After adding a dependency to "androidx.security:security-crypto:1.0.0-alpha02", I get the error message "More than one file was found with OS independent path 'build-data.properties'." I have tried to correct it by changing the version of the library (1.1.0-alpha01; 1.0.0-alpha02; 1.0.0-alpha01) and modifying the packageoptions section as I have found on the net but nothing has worked. Thanks for your help.
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.skcc.myapp"
minSdkVersion 28
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable false
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
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.gms:play-services-vision:11.8.0'
implementation "androidx.security:security-crypto:1.0.0-alpha02"
//
}
I found solution at Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile
Regards
packagingOptions {
pickFirst '**'
}
i am trying to integrate firebase to my android project but constantly getting error of
"In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[17.0.
4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:17.3.4 -> com.google.firebase:firebase-iid#[17.0.4], but fire
base-iid version was 20.0.2."
my code for the app gradle build is-------
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.goldfish"
minSdkVersion 17
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'
}
}
packagingOptions {
// Exclude file to avoid
// Error: Duplicate files during packaging of APK
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
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'
implementation "com.google.firebase:firebase-messaging:17.3.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.google.firebase:firebase-analytics:17.2.2'
}
Upgrade to the latest versions of the Firebase libraries:
implementation 'com.google.firebase:firebase-messaging:20.1.5'
implementation 'com.google.firebase:firebase-analytics:17.3.0'
I am using firebase messgessing sdk for push-notification. Here am not using androidx plugin. When am build its throw some error.
My gradle...
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.xxxxx"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// packagingOptions {
// pickFirst 'META-INF/*'
// exclude 'META-INF/proguard/androidx-annotations.pro'
// }
android.packagingOptions {
pickFirst 'META-INF/*'
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/proguard/androidx-annotations.pro'
}
}
configurations.all { exclude group: 'com.android.support', module: 'support-v4' }
dependencies {
ext {
support_library_version = '28.0.0'
}
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.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.android.support:multidex:1.0.3'
// implementation 'com.google.android.gms:play-services-gcm:17.0.0'
}
apply plugin: 'com.google.gms.google-services'
Error is...
Error: Program type already present: android.support.v4.os.ResultReceiver
once i remove the firebase sdk build is working fine. I search many solutions but still not working please anyone give me a solution.
Advance thanks...
I have an android project that was made in eclipse, I have imported it to Android Studio started fixing the errors, but I don't know how to fix this one
I have already changed the targetSdkVersion, minSdkVersion and compileVersion, I also changed some dependencies but still not a fix
Here is my gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.wansoft"
minSdkVersion 14
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation project(':sherlockSlidingMenu')
implementation project(':pullToRefresh')
implementation project(':roboAccordionView')
//compile 'com.android.support:support-v4:25.3.1'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.code.gson:gson:2.2.4'
implementation 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
//compile 'com.android.support:support-v4:18.0.0'
implementation files('libs/commons-lang3-3.1.jar')
implementation files('libs/guice-3.0-no_aop.jar')
implementation files('libs/http-request-5.4.jar')
implementation files('libs/jackson-core-asl-1.9.11.jar')
implementation files('libs/jackson-mapper-asl-1.9.11.jar')
implementation files('libs/javax.inject-1.jar')
implementation files('libs/retrofit-1.6.1.jar')
implementation files('libs/roboguice-2.0.jar')
implementation files('libs/spring-android-core-1.0.1.RELEASE.jar')
implementation files('libs/spring-android-rest-template-1.0.1.RELEASE.jar')
implementation 'com.android.support:support-annotations:+'
}
and here is the error i get:
Android resource linking failed
/Users/dario_leija/Documents/Proyectos_Documentos/ComanderoAndroid/wansoftApp/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1550: error: resource android:attr/popupPromptView is private.
error: failed linking references.
I am trying to run my application to process payments but I have run into this error. There are no errors within my code but I am unsure as to how to fix the issue. My code is below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.firebase.alokraj.firebaselogin"
minSdkVersion 23
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'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
// prevent error message "More than one file was found with OS independent path 'META-INF/DEPENDENCIES'"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta5'
//Firebase
implementation 'com.google.firebase:firebase-core:10.0.1'
implementation 'com.google.firebase:firebase-auth:10.0.1'
implementation 'com.google.firebase:firebase-database:10.0.1'
// HTTP library (for Mailgun)
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.paypal.sdk:paypal-android-sdk:2.15.3'
}
// Firebase
apply plugin: 'com.google.gms.google-services'
Can anyone help?