我收到上述错误。我想在我的应用程序中显示路线。我还想跟踪设备的实时位置。但首先我只想显示到用户的路线。
我也向the same question展示了Stack Overflow,我照他们说的做,但是那没用。
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.shareride"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//firebase dependency.
implementation 'com.google.firebase:firebase-auth:19.3.0'
implementation 'com.google.firebase:firebase-database:19.2.1'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.android.support:appcompat-v7:29.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:29.+'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//dependency for material component...
implementation 'com.google.android.material:material:1.0.0'
//dependency for circular image view
implementation 'de.hdodenhof:circleimageview:3.0.1'
//Lottie animation dependency
implementation 'com.airbnb.android:lottie:3.3.1'
//dependency for firebase
implementation 'com.google.firebase:firebase-analytics:17.3.0'
//dependency for image crop
api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
//dependency for picaso
implementation 'com.squareup.picasso:picasso:2.71828'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
//recyclerview dependency
implementation 'com.android.support:recyclerview-v7:28.0.0'
//location service dependency.
implementation "com.google.android.gms:play-services-location:17.0.0"
// direction
implementation 'com.google.maps:google-maps-services:0.11.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'