As my gradle file on app level is as:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.developer.pkcaller"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-iid:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.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 files('libs/volley.jar')
implementation 'com.firebaseui:firebase-ui:2.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.hbb20:ccp:1.7.2'
implementation 'com.facebook.android:facebook-login:[4,5)'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
//implementation 'com.google.android.gms:play-services:16.0.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
And I got error is as follows:
error: cannot access zzbgl class file for
com.google.android.gms.internal.zzbgl not found
Please help me solve this. I am stuck in this. Please help me regarding I will be highly grateful to you.
Related
I am getting the following error our of no where
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not find any matches for com.onesignal:OneSignal:[3.9.1,3.99.99] as no versions of com.onesignal:OneSignal are available.
I can not figure out why this would be happening. Any help would be greatly appreciated.
Here is my entire gradle file.
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 28
defaultConfig {
applicationId "-----"
minSdkVersion 15
targetSdkVersion 28
versionCode 65
versionName "1.0.65"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
onesignal_app_id: '-----',
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.github.apl-devs:appintro:v4.2.3'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
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.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'com.android.volley:volley:1.1.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
compile 'com.google.zxing:core:3.2.1'
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
}
apply plugin: 'com.google.gms.google-services'
I just had this issue too.
I changed version to just 3.1.9 like below and everything worked fine.
I mean like this:
compile 'com.onesignal:OneSignal:3.9.1'
change the line as like this
implementation 'com.onesignal:OneSignal:3.9.1'
for me work also! thanks
INFO: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
As I said in the title it used to work fine but suddenly it doesn't anymore, I'm not getting any errors in 'Run' so I really can't locate where the probleme is
here is my gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.nearmessenger"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
allprojects {
repositories {
jcenter()
maven { url "https://dl.bintray.com/hani-momanii/maven" }
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-emoji-appcompat:28.0.0'
implementation 'com.android.support:support-emoji-bundled:28.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.firebaseui:firebase-ui-database:4.3.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
as well as I'm getting this feedback when i click on the send code button in 'RUN':
W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal#830b094
I am getting following error after upgrading my project to the latest dependencies
Didn't find class "com.google.android.gms.common.util.zzq" on
path: DexPathList[[zip
file "/system/framework/org.apache.http.legacy.boot.jar",
zip file "/data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.example-jBf5YcFyN-t4Cm8erTCBwQ==/lib/x86,
/system/lib]]"
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.example"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled true
}
// buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:27.1.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'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
/*map place autosuggest*/
//for calendar class
implementation 'joda-time:joda-time:2.9.9'
implementation 'de.hdodenhof:circleimageview:2.2.0'
//QB dependecies
implementation 'com.quickblox:quickblox-android-sdk-core:3.8.1'
implementation('com.quickblox:quickblox-android-sdk-chat:3.8.0') {
transitive = true
}
implementation 'com.quickblox:chat-message-adapter:2.0'
implementation 'com.quickblox:quickblox-android-sdk-content:3.8.0'
implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.2#aar'
implementation 'com.github.orangegangsters:swipy:1.2.3#aar'
implementation project(':sample-core')
// implementation 'com.jwang123.flagkit:flagkit:1.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
//GoogleServicesPlugin.config.disableVersionCheck = true
Can anyone guide me how to solve this issue.
I have been searching stackoverflow from last two days for the solution of this issue. Please help.
Ensure that your top-level build.gradle contains a reference to the google() repo or to maven { url "https://maven.google.com" }.
remove this from your build.gradle file and sync again
apply plugin: 'com.google.gms.google-services'
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
I started getting the below error
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I tried to reset my backup when it was working but the same problem
I tried all the solution such as
multiDexEnabled true
cleaning and rebuilding the project, but it didn't work. Any help will be appreciated.
App file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resConfigs "auto"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
supportLibraryVersion = '27.0.2'
grpcVersion = '1.4.0'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
//appcompat libraries
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:support-v4:27.1.0'
//butterknife
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.scottyab:aes-crypto:0.0.4'
//circleimageview
implementation 'de.hdodenhof:circleimageview:2.2.0'
//ZXing for barCode reader
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.google.zxing:core:3.2.1'
//gson
compile 'com.google.code.gson:gson:2.8.2'
//recyclerview and cardview
implementation 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:+'
//play-services
compile 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
implementation 'com.jaeger.statusbarutil:library:1.4.0'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:support-annotations:27.0.2'
compile 'com.wang.avi:library:2.1.3'
}
Project file
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I had looked at many other questions and answers on here but cannot seem to find a solution that will rectify the problem :(
I have solved after try all the solutions on stackoverflow, try to do the following steps in its order
Replace all compile with implementation
Make all supportLibraryVersion = '27.0.2'
Change
'com.google.android.gms:play-services-maps:11.8.0'
to
'com.google.android.gms:play-services-maps:11.4.0'
Remove all the unused library
Delete the .gradle folder inside your project
Remove build folders and the gradle cache
file -> invalidate caches/restart
Build > Clean Project
Add
dependencies { implementation 'com.android.support:multidex:1.0.1'}
Add
android {
defaultConfig {
multiDexEnabled true
}
}
Async project
And finally this is my App file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
supportLibraryVersion = '27.0.2'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
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:support-v4:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
//constraint
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//butterknife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//avi:library
implementation 'com.wang.avi:library:2.1.3'
//circleimageview
implementation 'de.hdodenhof:circleimageview:2.2.0'
//retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.0.2'
//recyclerview and cardview
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
//ZXing for barCode reader
implementation 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
implementation 'com.google.zxing:core:3.2.1'
//play-services
implementation 'com.google.android.gms:play-services-maps:11.4.0'
//gson
implementation 'com.google.code.gson:gson:2.8.2'
//statusbarutil
implementation 'com.jaeger.statusbarutil:library:1.4.0'
//glide
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
//multidex
implementation 'com.android.support:multidex:1.0.1'
}
ِِActually I didn't understand the real reason about it and why that happened suddenly
So if anyone know that please tell me with full details
I hope this will help you
this worked for me after couple of hours wasting time
just do this
Implementation >>> annotationProcessor