React Native — проект отказался собираться после перехода на новый ПКAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 React Native — проект отказался собираться после перехода на новый ПК

Сообщение Anonymous »

У меня был очень старый проект. По большей части он по-прежнему работает нормально, и я по-прежнему отвечаю за его обслуживание. Когда я попытался переместить проект на другой компьютер и попытаться создать приложение в Android Studio, я получил следующую ошибку:

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

* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find mapbox-android-accounts-0.7.0.aar (com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0).
Searched in the following locations:
https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.aar

==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find mapbox-android-accounts-0.7.0.aar (com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0).
Searched in the following locations:
https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.aar

==============================================================================

5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find mapbox-android-accounts-0.7.0.aar (com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0).
Searched in the following locations:
https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.aar

==============================================================================

6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find mapbox-android-accounts-0.7.0.aar (com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0).
Searched in the following locations:
https://jcenter.bintray.com/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.aar

==============================================================================

7: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':realm:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

==============================================================================

Вот мои файлы build.gradle (android/build.gradle):

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

buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 34
}

repositories {
google()
mavenCentral()  // Maven Central repository
jcenter()
maven { url "$rootDir/../node_modules/react-native/android" }
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.4' ////  
classpath 'com.google.gms:google-services:4.3.13'
classpath "com.bugsnag:bugsnag-android-gradle-plugin:5.+"
}
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&&  !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}

allprojects {
repositories {
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}

mavenLocal()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url ("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}

google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}

Я пробовал:
  • Сопоставить узел, jdk, построить Gradle и версию AGP (узел v16.20.2, jdk 11, сборка gradle 6.2, AGP 3.5.4)
  • Сделать недействительным, очистить и перезапустить AS
  • Изменить compileSdkVersion на 34
  • Я попробовал очистить кэш npm --force, rmdir /s /q node_modules и npm install
    Я переместил несколько проектов (запустил более новую версию gradle и RN, чем этот проект) раньше и он работал нормально, но не этот.


Подробнее здесь: https://stackoverflow.com/questions/789 ... o-a-new-pc
Реклама
Ответить Пред. темаСлед. тема

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

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

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

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

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

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