Unresolved reference:databinding
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system, mobile
Hướng nghiên cứu
Bắt đầu với app/build.gradle và settings.gradle, sau đó kiểm tra cấu hình viewBinding và sourceSets cùng với import MapboxActivityTurnByTurnExperienceBinding được tạo. Chạy Gradle sync/build để xác định lý do tham chiếu không được tạo; hoàn tất khi ví dụ biên dịch được với tham chiếu binding đã được phân giải.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I am trying to use the turn-by-turn navigation example, but I cannot resolve the reference:
import com.mapbox.navigation.examples.databinding.MapboxActivityTurnByTurnExperienceBinding
I am having a hard time just to fix this. Could anyone help me, please?
Here is gradle (project):
buildscript {
ext.kotlin_version = '1.7.20-RC'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: project.property("MAPBOX_DOWNLOADS_TOKEN") as String
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle (app)
plugins {
id 'com.android.application'
}
apply plugin: 'kotlin-android'
android {
compileSdk 32
defaultConfig {
applicationId "com.example.android.testenavegacao"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
def srcDirs = file("$projectDir/src/main/java/com/mapbox/navigation/examples")
.listFiles({ it.isDirectory() } as FileFilter)
.collect { it.name }
res.srcDirs = ['src/main/res']
srcDirs.forEach {
res.srcDirs += 'src/main/java/com/mapbox/navigation/examples/' + it + '/res'
}
}
}
configurations {
all*.exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-telemetry'
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'androidx.core:core:1.8.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.1'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
implementation 'com.google.firebase:firebase-config:21.1.1'
implementation 'androidx.databinding:databinding-adapters:7.2.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "androidx.core:core-ktx:1.8.0"
implementation "com.google.android.gms:play-services-location:20.0.0"
implementation "androidx.multidex:multidex:2.0.1"
implementation "com.squareup.leakcanary:leakcanary-android:2.8.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.mapbox.maps:android:10.7.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-core:5.0.2'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.11.0'
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:6.7.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.7.0'
/ Mapbox Navigation Android Auto SDK Developer Preview /
implementation("com.mapbox.navigation:ui-androidauto:0.8.0")
implementation "com.mapbox.navigation:ui-dropin:2.7.0"
implementation "com.mapbox.navigation:android:2.7.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6'
implementation "androidx.core:core-ktx:+"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
settings.gradle
dependencyResolutionManagement {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be mapbox (not your username).
username = "mapbox"
// Use the secret token you stored in gradle.properties as the password
password = "pass-"
}
}
}
}
}
rootProject.name = "testenavegacao"
include ':app'
- Ngôn ngữ chính
- Kotlin
- Star
- 65
- Fork
- 57
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/mapbox-navigation-android-examples
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
onClick on map is not foundĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
mapbox/mapbox-navigation-android-examples#207 · 4 bình luận ·
-
instruction index is nullĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của mapbox/mapbox-navigation-android-examples
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
navikt/mock-oauth2-server#1129 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose `close` on SsrEngineĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
-
unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
thunderbird/thunderbird-android#11778 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
software-mansion/enriched-markdown#1042 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
world-federation-of-advertisers/cross-media-measurement#4709 ·
Maintainer thường phản hồi trong vòng 1 ngày