mapbox Add Navigation Dependencies - android

I'm attempting to follow the mapbox tutorials for the Navigation API.
In my app build.gradle I've added:
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-core-utils:25.4.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1'
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:25.4.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.5.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'
}
But the gradle build could not resolve. What is the situation? I thought all I needed was to add the dependencies block and it would acquire the dependency. I've already set my proxy settings. It acquires the other mapbox dependencies.
Error Message:
Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not resolve com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1.
Required by:
project :app
Could not resolve com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
dl.google.com
Could not resolve com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1.
Could not get resource 'https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
Could not GET 'https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
jcenter.bintray.com
Could not resolve com.mapbox.mapboxsdk:mapbox-android-navigation:0.11.1.
Could not get resource 'https://maven.google.com/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
Could not GET 'https://maven.google.com/com/mapbox/mapboxsdk/mapbox-android-navigation/0.11.1/mapbox-android-navigation-0.11.1.pom'.
maven.google.com

// You Can Use This Lib. For Android Studio 3.0.1
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.9.0'
implementation('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.9.0') {
transitive = true
}
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:5.3.2'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:5.3.2#aar') {
transitive = true
}

// It's Including Basic Needed Dependencies
classpath "com.android.tools.build:gradle:4.1.3"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.36'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
// build.gradle
// RX
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
//Network
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
// GSON
implementation 'com.google.code.gson:gson:2.8.6'
// LifeCycle
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
// Navigatiopn
implementation "androidx.navigation:navigation-compose:2.4.0-alpha03"
/// navigation component
implementation "androidx.navigation:navigation-fragment:2.3.5"
implementation "androidx.navigation:navigation-ui:2.3.5"
// Hilt
implementation "com.google.dagger:hilt-android:2.37"
annotationProcessor 'com.google.dagger:hilt-android-compiler:2.36'

Related

R8 warning "Missing class: javax.swing.JFrame", how to get ride of Swing?

Recently I noticed that when I compile my app in release mod, R8 log the following warning message: Missing class: javax.swing.JFrame along with others Swing/Java desktop classes like Missing class: java.awt.event.WindowAdapter or Missing class: java.applet.Applet.
Unless I'm wrong, this have nothing to do in my Android application. How can I find where this come from?
I tried to check my app dependencies using ./gradlew app:dependencies but found nothing relevant since those classes come from the JRE.
My dependencies list as requested:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
implementation "io.reactivex.rxjava2:rxjava:2.2.19"
implementation "joda-time:joda-time:2.10.6"
implementation "org.greenrobot:eventbus:3.2.0"
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.3"
implementation("com.crashlytics.sdk.android:crashlytics:2.10.1#aar") {
transitive = true
}
implementation "xom:xom:1.3.5"
implementation "io.requery:requery-android:1.6.1"
implementation "io.requery:requery-jackson:1.6.1"
kapt "io.requery:requery-processor:1.6.1"
implementation "com.squareup.okhttp3:okhttp:4.7.2"
implementation "com.squareup.okhttp3:logging-interceptor:4.7.2"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-scalars:2.9.0"
implementation "com.squareup.retrofit2:converter-jackson:2.9.0"
implementation "com.fasterxml.jackson.core:jackson-databind:2.11.0"
implementation "com.google.android.material:material:1.1.0"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation("com.mikepenz:materialdrawer:6.1.2") {
transitive = true
}
implementation "com.balysv.materialmenu:material-menu:2.0.0"
implementation "com.airbnb.android:lottie:3.4.0"
implementation "com.github.rey5137:material:1.3.0"
implementation "com.github.sevar83:indeterminate-checkbox:1.0.5#aar"
implementation "com.github.woxthebox:draglistview:1.7.1"
implementation "me.philio:pinentryview:1.0.6"
testImplementation "org.robolectric:robolectric:4.3.1"
implementation "org.robolectric:annotations:4.3.1"
implementation "org.robolectric:shadowapi:4.3.1"
kaptTest "com.google.auto.service:auto-service:1.0-rc6"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.2"
testImplementation "androidx.test:runner:1.2.0"
testImplementation "androidx.test:core:1.2.0"
testImplementation "org.mockito:mockito-core:3.3.3"
kaptAndroidTest "org.mockito:mockito-android:3.3.3"
}

reason of android.support.v4.media.MediaBrowserCompat$CallbackHandler error

There is an old source needs an update, but it shows an Error:
Program type already present: android.support.v4.media.MediaBrowserCompat$CallbackHandler
gradle.properties file included:
android.useAndroidX = true
android.enableJetifier = false
app.gradle:
compileSdkVersion 29
minSdkVersion 19
targetSdkVersion 29
def component_version = '27.1.1'
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
//noinspection GradleCompatible
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:' + component_version
implementation 'com.android.support:design:' + component_version
implementation 'com.android.support:recyclerview-v7:' + component_version
implementation 'com.android.support:cardview-v7:' + component_version
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// FCM
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-core:17.2.1'
// Material Dialog
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
// Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.bumptech.glide:okhttp-integration:1.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
// Yoyo Animation
implementation 'com.daimajia.easing:library:2.1#aar'
implementation 'com.daimajia.androidanimations:library:2.3#aar'
// Abring SDK
implementation 'com.github.msddev:abring-sdk-android:v0.4'
// Infinite Scroll
implementation 'com.github.pwittchen:infinitescroll:0.0.1'
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation('com.squareup.retrofit2:retrofit:2.1.0') {
// exclude Retrofit’s OkHttp dependency module and define your own module import
exclude module: 'okhttp'
}
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
// JW player
implementation 'com.longtailvideo.jwplayer:jwplayer-core:+'
implementation 'com.longtailvideo.jwplayer:jwplayer-common:+'
implementation project(':mediapicker')
}
According to what you have included in your question, you are trying to add AndroidX libraries into your project.
Irregardless, the android.support.v4.media.MediaBrowserCompat which is an older support library is being referenced from multiple dependencies. That is the meaning of the error you are seeing.
To resolve this, you should run gradlew app:dependencies to retrieve a list of all libraries and see which is referencing the library in question.
Once you find the problem, you can exclude the library from the dependency by:
implementation ('library_name') {
exclude module: 'android.support.v4.media.MediaBrowserCompat'
}
I would also consult the documentation to migrate to AndroidX, since there is no more support for older support libraries.

Failed in linking file

Dependency is appcompat dependency is underlined red and failed to build project fully
Changed all support libraries to use the compiledsdk version but still didnt work
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
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'
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:cardview-v7:28.1.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'com.onesignal:OneSignal:3.10.7#aar'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.ixiDev:GDPRChecker:v0.2'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3#aar'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.github.arcadefire:nice-spinner:1.4.3'
implementation 'com.github.mjn1369:prettydialog:1.0.4'
implementation project(path: ':SmoothCheckBox-master')
implementation project(':androidsaripaarmaster')
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation project(':rating-view')
implementation project(':pinlockview')
That is the error message that shows:
Compilation failed to complete
Problem is in this dependency com.google.android.gms:play-services-location:17.0.0. This location dependency use androidX Libraries.
Solution is: Either downgrade this dependency version or migrate to Androidx (whole project dependencies)

Gradle sync fails - com.google.android.gms:play-services-basement is being requested by various other libraries

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.

NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzcce

My project builds just fine, but when I try to run it, it runs but I get this error on the debugger terminal. Does anyone know how to fix it?
Error:
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzcce;
build.gradle:
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:design:28.0.0-alpha3'
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.0'
implementation 'com.google.android.gms:play-services-maps:+'
implementation 'com.google.android.gms:play-services:+'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.google.firebase:firebase-auth:+'
implementation 'com.google.android.gms:play-services-auth:+'
Add this to your project build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}

Categories

Resources