I really don't know what's going on, I've searched everything and nothing worked. If someone could help me, I would really appreciate. I change all dependencies and libraries to try to solve it, but nothing worked.
Yesterday,my app was working fine.
Today, I don't know why, the app didn't compile anymore after I reopened the Android Studio.
Here is build.gradle Project
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.devbrackets.android:exomedia:4.0.0'
implementation 'com.google.firebase:firebase-ads:17.1.0'
implementation 'com.startapp:inapp-sdk:3.6.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.google.android.gms:play-services-ads:17.1.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
}
Here is build.gradle Project
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Related
I want to use the Geotools library in my android code. But the library is not being added correctly. To use the library I used the following address and acted accordingly.
"Gradle not imported dependency with ext:pom"
I enter the following commands And I get the error below.
please guide me. That's a big problem. I have tried different solutions.
Thanks
//// code
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'org.osmdroid:osmdroid-android:6.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'org.osmdroid:osmdroid-mapsforge:5.5:release#aar'
implementation 'com.github.MKergall:osmbonuspack:6.4'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.0.1'
implementation 'org.osmdroid:osmdroid-wms:6.0.2'
implementation 'org.slf4j:slf4j-android:1.6.1-RC1'
//noinspection GradleCompatible
//implementation 'com.android.support:appcompat-v7:21.0.3'
//implementation 'com.google.android.gms:play-services:6.5.87'
//noinspection GradleCompatible
//implementation 'com.android.support:appcompat-v7:23.4.0'
//implementation 'com.google.android.gms:play-services:9.0.2'
implementation 'com.github.samanzamani.persiandate:PersianDate:0.7'
implementation 'ca.rmen:lib-sunrise-sunset:1.1.1'
implementation 'com.github.beyka:androidtiffbitmapfactory:0.9.8.7'
//api 'com.vividsolutions:jts-core:1.14.0'
//api 'com.vividsolutions:jts-io:1.14.0'
//api ('org.orbisgis:cts:1.5.1') {
//exclude group: 'org.slf4j'
// }
//implementation 'org.orbisgis:cts:1.5.1', {
// exclude module: 'org.slf4j'
//}
//implementation 'org.jdom:jdom:1.1.3'
//implementation 'net.schmizz:sshj:0.10.0'
//api 'org.geotools:gt-data:20.0'
//implementation 'org.geotools:gt-shapefile:20.0'
implementation 'com.github.beyka:androidtiffbitmapfactory:0.9.8.7'
implementation 'com.drewnoakes:metadata-extractor:2.12.0'
/**
implementation 'org.geotools:gt-main:16.1'
implementation 'org.geotools:gt-metadata:17.1'
implementation 'org.geotools:gt-referencing:17.1'
implementation 'org.geotools:gt-epsg-hsql:2.5.6'
implementation 'org.geotools:gt-epsg-extension:10.2'
implementation 'org.geotools:gt-main:16.1'
*/
}
allprojects {
repositories {
google()
//maven { url 'http://download.osgeo.org/webdav/geotools/' }
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
maven { url "https://dl.bintray.com/caarmen/maven/" }
// maven { url "http://repo.boundlessgeo.com/main" }
//maven { url 'https://mvnrepository.com/artifact/org.geotools/gt-main' }
mavenLocal()
maven { url 'http://repo.boundlessgeo.com/main' }
maven { url "http://download.osgeo.org/webdav/geotools/" }
maven { url "http://download.java.net/maven/2" }
maven { url "http://repo.opengeo.org" }
mavenCentral()
}
}
//////error
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not find jai_core.jar (javax.media:jai_core:1.1.3).
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app#debugAndroidTest/compileClasspath': Could not find jai_core.jar (javax.media:jai_core:1.1.3).
Show Details
Affected Modules: app
I'm trying to migrate to new sdk client inside an application.
When I tried to introduce the implementation inside my build.gradle the application throws an exception. What can I do to solve it?
What I have tried:
I have included inside build.gradle the following implementation
implementation 'com.google.android.libraries.places:places-compat:1.1.0'
also I have tried with
implementation 'com.google.android.libraries.places:places:1.1.0'
both of them throws the following error
Unable to resolve dependency for project : Could not resolve com.android.volley:volley:1.1.1.
Is anything I can do to make it compatible?
What are the changes I need to do?
Here is my build.gradle dependencies
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation files('libs/volley.jar')
implementation('de.keyboardsurfer.android.widget:crouton:1.8.1') {
exclude group: 'com.google.android', module: 'support-v4'
implementation 'com.google.maps.android:android-maps-utils:0.3+'
}
annotationProcessor 'org.parceler:parceler:1.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.7'
implementation 'com.google.android.libraries.places:places-compat:1.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.squareup:otto:1.3.5'
implementation 'com.squareup.picasso:picasso:2.3.2'
annotationProcessor 'io.realm:realm-android:0.82.0-SNAPSHOT'
implementation 'io.realm:realm-android:0.82.0-SNAPSHOT'
implementation 'com.android.support:multidex:1.0.1'
implementation 'org.parceler:parceler-api:1.1.1'
implementation 'org.apache.amber:amber-oauth2-client:0.22-incubating'
implementation 'org.apache.amber:amber-oauth2-common:0.22-incubating'
implementation 'org.slf4j:slf4j-api:1.7.12'
}
project build.gradle
buildscript {
repositories {
mavenCentral()
maven {
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
mavenCentral()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
}
Please verify if you have this repository added in your app level gradle file
allprojects {
repositories {
jcenter()
}
}
Also change this line
implementation files('libs/volley.jar')
to
implementation 'com.android.volley:volley:1.1.0'
As you are facing issue Program type already present: com.android.volley.AuthFailureError
Add this in your app dir build.gradle
android{
configurations {
all*.exclude group: 'com.android.volley'
}}
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.1,11.0.1], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
When i am trying to add Firebase on my android project,I got this error.I have done every possible things to solve this error,but i still getting this error.Please give me some suggestion to solve this issue.
App level dependency
repositories {
maven {
url "http://dl.bintray.com/lukaville/maven"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design: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 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.applozic.communication.uiwidget:mobicomkitui:5.8.4'
implementation 'com.facebook.android:facebook-login:4.28.0'
implementation 'com.facebook.android:account-kit-sdk:4.28.0'
implementation 'com.facebook.android:facebook-android-sdk:4.28.0'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
//noinspection GradleCompatible
implementation 'com.borjabravo:readmoretextview:2.0.1'
implementation 'com.gmail.samehadar:iosdialog:1.0'
implementation 'com.gdacciaro:iosdialog:1.0.3'
implementation 'com.wdullaer:materialdatetimepicker:3.6.0'
implementation 'com.bignerdranch.android:recyclerview-multiselect:0.2'
implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.ms-square:expandableTextView:0.1.4'
implementation 'com.nbsp:library:1.8'
implementation 'net.gotev:uploadservice:2.1'
implementation 'javax.mail:javax.mail-api:1.5.3'
implementation 'com.google.firebase:firebase-core:16.0.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'
}
apply plugin: 'com.google.gms.google-services'
project level dependency
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
I am not sure about the root cause of this problem(Probably some dark magic).
add:
import com.google.gms.googleservices.GoogleServicesPlugin
GoogleServicesPlugin.config.disableVersionCheck = true
to the app level build.gradle file.
Took the advice from:
https://github.com/OneSignal/OneSignal-Gradle-Plugin/issues/37
I am frustrated that I don't understand the reason for that. But it may help.
This is my build gradle (App)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
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:26.+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:support-v4:26.+'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.android.support:recyclerview-v7:26.+'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-auth:9.0.2'
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
}
In the build gradle (Project)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.2'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
}
}
Here is the error
Failed to resolve: firebase-messaging-15.0.0
The Firebase assistant show that Dependencies set up correctly, but Sycn fail. Please help me.
Try changing the version of firebase messaging to 17.3.2 like
implementation 'com.google.firebase:firebase-messaging:17.3.2'
Change this:
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
into this:
implementation 'com.google.firebase:firebase-messaging:17.3.2'
com.google.firebase is the group id
firebase-messaging is the artifact id
17.3.2 is the version
Check the versions here:
https://firebase.google.com/support/release-notes/android
Either use implementation 'com.google.firebase:firebase-messaging:17.0.0' or implementation 'com.google.firebase:firebase-messaging:15.0.0'
Following the documentation of firebase you can downloading with
implementation 'com.google.firebase:firebase-messaging:17.3.0'
Remove
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
add
implementation 'com.google.firebase:firebase-database:17.0.0'
After update gradle and plugin
i have trouble to build
The library com.google.android.gms:play-services-base is being requested by various other libraries at [[11.0.1,11.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
My gradle :
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "io.realm:realm-gradle-plugin:3.1.1"
classpath 'com.google.gms:google-services:4.0.1'
}
}
My app/gradle
dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0#aar') {
transitive = true
}
implementation 'com.facebook.android:account-kit-sdk:4.28.0'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.4'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/glide-3.8.0.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.squareup.okhttp:okhttp-urlconnection:2.3.0') {
exclude group: 'com.squareup.okhttp', module: 'okhttp'
}
implementation('com.squareup.okhttp:okhttp:2.3.0') {
exclude group: 'com.squareup.okio', module: 'okio'
}
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
}
I resolved issue.it
This is solution
1.add google() before jcenter() in gradle and app/gradle
2.exclude group:"com.google.android.gms" in facebook sdk dependencies
My code
Gradle :
buildscript {
repositories {
google()
jcenter()
}
// something here ...
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "io.realm:realm-gradle-plugin:3.1.1"
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And Myapp/gradle :
repositories {
maven { url 'https://maven.fabric.io/public' }
google()
jcenter()
}
dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0#aar') {
transitive = true
}
implementation ('com.facebook.android:account-kit-sdk:4.28.0'){
exclude group:"com.google.android.gms"
}
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.4'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/glide-3.8.0.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.squareup.okhttp:okhttp-urlconnection:2.3.0') {
exclude group: 'com.squareup.okhttp', module: 'okhttp'
}
implementation('com.squareup.okhttp:okhttp:2.3.0') {
exclude group: 'com.squareup.okio', module: 'okio'
}
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
}
apply plugin: 'com.google.gms.google-services'
This working nicely for me,hope help you guys!!!