'[MapBox]NavigationMapRoute not resolved
repositories {
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://maven.google.com' }
}
dependencies {
//Mapbox
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.3@aar') {
transitive = true
}
//Navigation
compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.5.0'
compile 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.0-SNAPSHOT'
//Location layer
compile 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.1.0'
//Geolocation
compile 'com.mapbox.mapboxsdk:mapbox-android-ui:2.1.3'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:6.5.87'
testCompile 'junit:junit:4.12'
}
I was developing a MapBox Navigation Android App. However, Android Studio cannot resolved the symbol when I trying to import the package
import com.mapbox.services.android.navigation.ui.v5.route.NavigationMapRoute;
Solution 1:[1]
In Android Studio 3.0.1 You Can Add This Lib. Like that
See on Build.gradle
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.demosmartstop"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0.0"
multiDexEnabled true
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:26.1.0'
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'
//TODO OTHEWR ACTIVITYS
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'com.github.whinc:ratingbar:1.1.1'
compile 'com.github.clans:fab:1.6.4'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.google.code.gson:gson:2.8.2'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//TODO RECYCLE VIEW
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
//TODO picaso for download image into device
compile 'com.squareup.picasso:picasso:2.5.2'
//TODO PopUu Window ToolPit
compile 'com.fenchtose:tooltip:0.1.5'
//Retrofit
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
//TODO MAPBOX LIB
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
}
//TODO MAultidex LIB
compile 'com.android.support:multidex:1.0.2'
}
And Other One Is Like That
Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'org.ajoberstar:gradle-git:1.7.0' // or higher
classpath 'io.realm:realm-gradle-plugin:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://maven.google.com" }
//TODO Toltip Window
maven { url "http://dl.bintray.com/jayrambhia/maven" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Solution 2:[2]
I can use Authorization Code grant flow auth APP server, but how about the browser?
In fact the authorization code based flow is the one that is suitable & meant for web client. While using this flow server will redirect the intermediate code (oauth code) to the redirect uri passed in the request so client can capture that code and make another request to exchange it with access_token.
Can I separate the auth server and restful server, If so, how auth server protect restful server? Blockquote
Yes, you can. The resource server should talk to auth server to get the authentication/token object verified.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yaqoob Bhatti |
| Solution 2 |
