При добавлении действия в проект gradle автоматически добавит последние зависимости androidx, которые не поддерживаются текущей версией, ориентированной на реагирование. Поэтому я попытался реализовать старый androidx вручную.
(версия компиляционного SDK = 33)
Я добавляю их в build.gradle(:app), но это не работает
1. Dependency 'androidx.activity:activity:1.8.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.transition:transition:1.5.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs.
..etc
Я пытаюсь добавить действие в мое приложение, но сборка не удалась при попытке запустить приложение
так как версия SDK для компиляции ниже требуемой (автоматически добавляются зависимости Androidx)
Попробуйте обновить gradle, чтобы изменить версию SDK для компиляции на 34.
Описание выше
Я пытался удалить автоматически добавляемые зависимости, отключив useAndroidx в gradle.properties
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=false
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false
И при попытке запустить приложение сборка не удалась.
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Configuration `:app:debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
Set `android.useAndroidX=true` in the `gradle.properties` file and retry.
[b]При добавлении действия в проект gradle автоматически добавит последние зависимости androidx, которые не поддерживаются текущей версией, ориентированной на реагирование.[/b] Поэтому я попытался реализовать старый androidx вручную.
(версия компиляционного SDK = 33) Я добавляю их в build.gradle(:app), но это не работает [code]implementation('androidx.activity:activity:1.6.0') implementation('androidx.transition:transition:1.4.1') implementation('androidx.annotation:annotation:1.3.0') [/code] Он по-прежнему использует последнюю версию AndroidX, что приводит к сбою сборки.
[code]1. Dependency 'androidx.activity:activity:1.8.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.transition:transition:1.5.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. [/code]
..etc [list] [*]Я пытаюсь добавить действие в мое приложение, но сборка не удалась при попытке запустить приложение
так как версия SDK для компиляции ниже требуемой (автоматически добавляются зависимости Androidx)
[*]Попробуйте обновить gradle, чтобы изменить версию SDK для компиляции на 34.
[*]Описание выше
[*]Я пытался удалить автоматически добавляемые зависимости, отключив useAndroidx в gradle.properties [code]# AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=false # Automatically convert third-party libraries to use AndroidX android.enableJetifier=false [/code] И при попытке запустить приложение сборка не удалась.
[code]Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. Configuration `:app:debugRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues. Set `android.useAndroidX=true` in the `gradle.properties` file and retry. [/code]