error when build apk. here is my compleate gradile file, i am not able
to find the error
this error comes while i runnning this app on emularor in some times and while i am trying to create apk file too
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
multiDexEnabled true
applicationId "com.norjimm.bingle"
minSdkVersion 17
targetSdkVersion 27
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'
}
}
dexOptions {
preDexLibraries = false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.+'
implementation 'com.android.support:support-v4:27.+'
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.android.support:design:27.+'
implementation 'com.android.support:cardview-v7:27.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.roughike:bottom-bar:2.3.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.mindorks:placeholderview:0.7.2'
implementation 'com.codesgood:justifiedtextview:1.0.2'
implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
implementation 'com.github.myinnos:AlphabetIndex-Fast-Scroll-RecyclerView:1.0.8'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.rm:rmswitch:1.2.2'
implementation 'com.facebook.fresco:fresco:1.1.0'
implementation 'com.linchaolong.android:imagepicker:1.1'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
implementation 'com.hyman:flowlayout-lib:1.1.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'
implementation 'com.github.neurospeech:unofficial-linkedin-sdk-android:v1.1.4'
}
just delete this line from file:
implementation 'com.android.volley:volley:1.0.0'
its conflict with jar you use at 'libs' folder
Related
I am migrating my application from target sdk 28 to 30 because to upload it on playstore its required but its giving library error for all the libraries.
Below is app level build file with all the required libraries.
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.devakya.kinderstudyzone"
manifestPlaceholders = [onesignal_app_id: "38d403ad-a92d-487f-afa2-c9b1a8c2907d",
onesignal_google_project_number: "REMOTE"]
minSdkVersion 17
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true // <------
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField 'String', 'server_url', server_url
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'androidx.test:runner:1.4.1-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha03'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//implementation 'com.android.support:customtabs:30.0.0'
implementation 'androidx.browser:browser:1.4.0'
//implementation 'com.android.support:support-v4:30.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
//implementation 'com.android.support:exifinterface:30.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
// implementation 'com.android.support:support-media-compat:30.0.0'
implementation "androidx.media:media:1.4.3"
// implementation 'com.android.support:recyclerview-v7:30.0.0'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
//implementation 'com.android.support:cardview-v7:30.0.0'
implementation "androidx.cardview:cardview:1.0.0"
// implementation 'com.android.support:design:30.0.0'//appcompact
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.onesignal:OneSignal:3.10.8#aar'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3#aar'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation project(':bettervideoplayer')
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.google.firebase:firebase-analytics:16.5.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.mjn1369:prettydialog:1.0.4'
implementation project(path: ':SmoothCheckBox-master')
implementation 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
How I resolve this error for libraries .which library version I change for it.
I am getting version crashes issue for aome libraires but I am unable to resolve it.
I'm trying to implement mediation to my source code but I keep getting the following error:
Program type already present: com.google.android.gms.common.zza
apply plugin: 'com.android.application'
android {
android.defaultConfig.vectorDrawables.setUseSupportLibrary(true)
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries false
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 17
targetSdkVersion 28
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
versionCode 13
versionName "2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.media:media:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
implementation 'devlight.io:navigationtabbar:1.2.5'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.leo.simplearcloader:simplearcloader:1.0.+'
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.okhttp3:okhttp:3.3.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
implementation 'com.jakewharton.timber:timber:3.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.0'
implementation 'com.github.vivchar:ViewPagerIndicator:1.1.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.github.GrenderG:Toasty:1.3.0'
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.google.android.exoplayer:exoplayer:r2.5.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.facebook.android:audience-network-sdk:5.+'
implementation 'com.google.android.ads.consent:consent-library:1.0.3'
implementation 'com.github.bhargavms:DotLoader:1.1.1'
implementation 'com.sothree.slidinguppanel:library:3.4.0'
implementation 'com.github.chrisbanes:PhotoView:1.2.5'
implementation 'com.github.TutorialsAndroid:progressx:v2.0'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.github.Gavras:GIFView:v1.2'
implementation 'com.facebook.rebound:rebound:0.3.8'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'jp.co.cyberagent.android:gpuimage:2.0.3'
implementation "com.leinardi.android:speed-dial:2.0.1"
implementation 'com.jackandphantom.android:blurimage:1.2.0'
implementation 'com.google.ads.mediation:adcolony:4.1.2.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I am actually a beginner, and I'm following the steps in google developer's documentation. I migrated my project to android X with no errors.
Can anyone help?
I am migrating my existing project to Androidx . After adding this 2 line
android.useAndroidX=true
android.enableJetifier=true
in gradle.properties , I get a bunch of compile error . I found many solution but nothing worked for me . Please help me out.Thanks
gradle(app-level)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.faridabadtaxirider"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '28.0.3'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
//Add library
implementation 'com.github.aarsy.googlemapsanimations:googlemapsanimations:1.0.5'
implementation 'com.facebook.android:account-kit-sdk:4.29.0'
implementation 'io.paperdb:paperdb:2.6'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'me.zhanghai.android.materialratingbar:library:1.2.0'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1#aar'
implementation 'com.firebase:geofire-android:2.1.2'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'//Fix crash account kit
implementation 'com.github.d-max:spots-dialog:1.1#aar'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-database:18.0.1'
implementation 'com.google.firebase:firebase-storage:18.1.1'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'androidx.cardview:cardview:1.0.0-beta01'
implementation 'com.google.android.libraries.places:places:1.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
}
apply plugin: 'com.google.gms.google-services'
Seems like 'me.zhanghai.android.materialratingbar:library:1.2.0' is not compatible with AndroidX. Try to use the latest version of that lib.
This is my Gradle file and it gives unable to merge dex error and cant run my app can any one solve it please???????I'm trying to run my project, but for some reason it gives me that error
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.ahmed.farid.gonerve"
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'
}
}
}
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.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'
//Design library for Coordinator Layout and Toolbars
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
//BottomNavigationViewEx library
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
//Circle ImageView
implementation 'de.hdodenhof:circleimageview:2.1.0'
//Universal image loader
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.github.danylovolokh:video-player-manager:0.2.0'
implementation 'com.google.code.findbugs:jsr305:2.0.1'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.firebase:geofire-android:2.1.1'
implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1#aar'
//Design library for Coordinator Layout and Toolbars
//BottomNavigationViewEx library
implementation'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.guava:guava:27.0-android'
//noinspection GradleCompatible
//firebase
implementation 'com.google.firebase:firebase-core:11.0.2'
//firebase auth
implementation 'com.google.firebase:firebase-auth:11.0.2'
implementation 'com.google.firebase:firebase-database:11.0.2'
implementation 'com.google.firebase:firebase-storage:11.0.2'
implementation 'com.google.android.gms:play-services-location:11.0.2'
implementation 'com.google.android.gms:play-services-maps:11.0.2'
implementation 'com.google.android.gms:play-services:11.0.2'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
Try this in
android/build.gradle
android {
defaultConfig {
multiDexEnabled true
}
}
In the import statement of Firebase is being highlighted red
After doing clean and rebuild project the error is had not been resolved. Dependencies are added in build.gradle but still nothing is happening
please help.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.admin.myapp"
minSdkVersion 16
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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
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'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.firebaseui:firebase-ui:2.0.1'
implementation 'com.firebaseui:firebase-ui-auth:2.0.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui:2.0.1'
}
apply plugin: 'com.google.gms.google-services'
This is my build.gradle file.
Add this to your build.gradle
implementation com.google.firebase:firebase-auth:16.0.2