Как исправить устаревшие функции Gradle, которые использовались в этой сборке, что делало ее несовместимой с Gradle 9.0Android

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Как исправить устаревшие функции Gradle, которые использовались в этой сборке, что делало ее несовместимой с Gradle 9.0

Сообщение Anonymous »

Я столкнулся с ошибкой сборки при попытке собрать приложение React Native с помощью npm run android. Сообщение об ошибке указывает, что зависимость (

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

androidx.core:core-ktx
или androidx.core:core) требует компиляции с уровнем API 34 или более поздней версии, тогда как мой проект в настоящее время настроен на компиляцию с уровнем API 33.
Также я установлены пакеты React-native-pdf и React-native-blob-util для проекта.
Вот соответствующая часть сообщения об ошибке

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings
30 actionable tasks: 25 executed, 5 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 2 issues were found when checking AAR metadata:

1.  Dependency 'androidx.core:core-ktx:1.12.0' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.

:app is currently compiled against android-33.

Also, the maximum recommended compile SDK version for Android Gradle
plugin 7.4.2 is 33.

Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 34, then update this project to use
compileSdkVerion of at least 34.

Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).

2.  Dependency 'androidx.core:core:1.12.0' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.

:app is currently compiled against android-33.

Also, the maximum recommended compile SDK version for Android Gradle
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 34, then update this project to use
compileSdkVerion of at least 34.

Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s
Я бы хотел, чтобы мой проект компилировался с использованием уровня API 33. Есть ли способ решить эту проблему с зависимостями без обновления версии компиляционного SDK?

Подробнее здесь: https://stackoverflow.com/questions/785 ... it-incompa
Реклама
Ответить Пред. темаСлед. тема

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

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

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

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

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

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