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.
Related
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 can't stop getting this error every time, and I don't know what caused it and how I can solve it:
Multiple dex files define Lcom/google/android/gms/location/places/zza;
I think it may have to do with google-services, but I'm not entirely sure.
app/build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 14
targetSdkVersion 28
versionCode 10173
versionName "4.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Fixes "Duplicate files copied in APK" build bug
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
// Pushy SDK
implementation 'com.google.firebase:firebase-messaging:17.5.0'
compile 'me.pushy:sdk:1.0.43'
// AppCompat v7 Dependency
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.google.android.gms:play-services-maps:16.1.0'
compile 'com.google.android.gms:play-services-places:10.2.0'
// Google Play Services Dependencies
compile 'com.google.android.gms:play-services-location:16.0.0'
compile 'com.google.android.gms:play-services-ads:17.1.1'
// All .jar files in ./libs
compile fileTree(dir: 'libs', include: ['*.jar'])
}
apply plugin: 'com.google.gms.google-services'
If your app has more than 65535 methods, you need to enable the multidex format for your app.
This can be caused by having lots of dependencies in your project.
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'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'
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/measurement/zzabn.class
This error shown while generating signed apk.
here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.jhaider.livefootballmatchesofworldcup"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
packagingOptions {
exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.xml'
exclude 'META-INF/maven/com.squareup.okhttp3/okhttp/pom.xml'
exclude 'META-INF/maven/com.squareup.okio/okio/pom.properties'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/maven/pom.properties'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/gson/FieldAttributes.class'
exclude '.readme'
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "app-type"
productFlavors {
live1016 {
applicationId "com.jhaider.livefootballmatchesofworldcup"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
dimension "app-type"
}
videohighlights {
applicationId "com.jhaider.livefootballmatchesofworldcup.videohighlights"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
dimension "app-type"
}
}
sourceSets {
live1016 {
java {
srcDir 'src/live1016/java'
}
resources {
srcDir 'src/live1016/res'
}
}
videohighlights {
java {
srcDir 'src/videohighlights/java'
}
resources {
srcDir 'src/videohighlights/res'
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.google.firebase:firebase-invites:15.0.0'
compile 'com.google.firebase:firebase-messaging:15.0.0'
compile 'com.google.firebase:firebase-ads:15.0.0'
compile 'com.google.firebase:firebase-auth:15.0.0'
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.firebaseui:firebase-ui-auth:3.2.2'
compile ('com.google.android.gms:play-services-auth:15.0.0'){
force=true
}
compile ('com.google.android.gms:play-services-location:15.0.0'){
force=true
}
compile project(':StartAppInApp-3.6.7')
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.okhttp3:okhttp:3.3.0'
compile 'org.jsoup:jsoup:1.9.2'
compile 'com.squareup.picasso:picasso:2.5.2'
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
I solved by upgrading all the firebase dependencies on build.gradle from 15.0.0 to 15.0.2 where available.
Go to https://firebase.google.com/docs/android/setup for latest versions available and note that latest version for com.google.firebase:firebase-ads is 15.0.0 and latest version for com.google.firebase:firebase-messaging is 15.0.2
Delete assets folder entry in the android studio (not from actual folder location). Then do a clean build.
Rather than downgrade or upgrade library, it would better to exclude one or more of the same class from different versions. For example, if you know from which module the class is from, you can use:
compile('com.google.android.gms:play-services-auth:15.0.0') {
exclude group: 'com.google.android.gms', module: 'module.of.dependecy,withconfllict'
}