Конфликт ошибок Mapbox Kotlin libc++_shared.soJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Конфликт ошибок Mapbox Kotlin libc++_shared.so

Сообщение Anonymous »

У меня проблема с реализацией Mapbox для моего приложения Kotlin
Я следовал документации: https://docs.mapbox.com/android/maps/gu ... stall/#add -the-dependent
Ну почти, шаг 2 в моем build.gradle (проекте) выглядит следующим образом:

Код: Выделить всё

    allprojects {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven {
url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
// Do not change the username below. It should always be "mapbox" (not your username).
credentials.username = "mapbox"
// Use the secret token stored in gradle.properties as the password
credentials.password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").get()
authentication { basic(BasicAuthentication) }
}
}
}
К сожалению, во время сборки у меня возникла проблема с конфликтом:
Найдено 2 файла по пути 'lib/arm64-v8a/libc++_shared.so ' из входных данных:
  • C:\Users\johanke.gradle\caches\transforms-3\b8c059599cd20d9173eec748d219fd64\transformed\jetified-pdfium-android-1.9.0 \jni\arm64-v8a\libc++_shared.so
  • C:\Users\johanke.gradle\caches\transforms-3\1d2cd570d97102124d90dc5c2939e546\transformed\jetified-common-24.3.1 \jni\arm64-v8a\libc++_shared.so
    Если вы используете jniLibs и ИМПОРТНЫЕ цели CMake, см.
    https://developer.android.com/r/tools/jniLibs-vs- import-targets
Похоже, существует две версии файла libc++_shared.so.
Чтобы попытайся исправить проблему я это сделал
Близнецы, посоветуй мне это

Код: Выделить всё

    android {
packagingOptions {
// Exclude the unnecessary library's architecture (e.g., arm64-v8a)
exclude 'lib/arm64-v8a/libc++_shared.so'
}
}
Я также пробовал это с помощью ChatGPT, но безуспешно.

Код: Выделить всё

    android {
...
packagingOptions {
exclude 'lib/arm64-v8a/libc++_shared.so'
exclude 'lib/x86_64/libc++_shared.so'
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
}
...
}
Так что да, он собирается хорошо, но приложение выходит из строя.
Возможно, это проблема конфликта с другой реализацией, но я не знаю, как ее решить. проблема при сохранении зависимостей, может ли кто-нибудь помочь мне в этом.
Вот список зависимостей:

Код: Выделить всё

    implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.room:room-rxjava2:2.6.1"
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.legacy:legacy-support-v4:1.0.0"

// Compose
implementation "androidx.compose.runtime:runtime:1.5.4"
implementation "androidx.compose.runtime:runtime-livedata:1.5.4"
implementation "androidx.compose.runtime:runtime-rxjava2:1.5.4"

//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

//Lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-common-java8:2.6.2"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

//Kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"

//Hilt
implementation 'com.google.dagger:hilt-android:2.48.1'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
kapt 'com.google.dagger:hilt-android-compiler:2.48.1'

//Room
implementation "androidx.room:room-runtime:2.6.0"
implementation "androidx.room:room-ktx:2.6.0"
kapt "androidx.room:room-compiler:2.6.0"

//Navigation
implementation "androidx.navigation:navigation-fragment-ktx:2.7.4"
implementation "androidx.navigation:navigation-ui-ktx:2.7.4"
implementation 'com.google.android.gms:play-services-maps:18.2.0'

//Glide
implementation 'com.github.bumptech.glide:glide:4.15.1'
kapt 'com.github.bumptech.glide:compiler:4.15.1'

//Timber
implementation 'com.jakewharton.timber:timber:5.0.1'

// okHttp3 pour télécharger des documents
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'

// Google play service pour coords
implementation 'com.google.android.gms:play-services-location:21.0.1'

// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// PDF
implementation 'com.itextpdf:itextpdf:5.5.13.2'
implementation ('com.github.barteksc:android-pdf-viewer:3.2.0-beta.1')

// Dépendances Firebase
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:31.2.3')
implementation 'com.google.firebase:firebase-crashlytics-ktx' // Crashlytics
implementation 'com.google.firebase:firebase-config-ktx' // Remote config
implementation 'com.google.firebase:firebase-analytics-ktx' // Analytics
implementation 'com.google.firebase:firebase-perf-ktx' // Performance

// Worker pour les notifications push
implementation "androidx.work:work-runtime:2.8.1"

// Picasso
implementation 'com.squareup.picasso:picasso:2.5.2'

// Carousel
implementation 'com.synnapps:carouselview:0.1.4'

// Skeleton loader
implementation "com.facebook.shimmer:shimmer:0.5.0"

// EncryptedSharedPreference
implementation "androidx.security:security-crypto:1.1.0-alpha06"

// Mapbox
implementation 'com.mapbox.maps:android:11.3.1'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Для получения дополнительной информации:
Версия Kotlin: 1.9.10

Gradle JDK: версия среды выполнения JetBrains 17.0.10< /п>

Подробнее здесь: https://stackoverflow.com/questions/784 ... -shared-so
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»