Как создать проект с версией «compileSdkVersion 22» и «targetSdkVersion 22»?

Рейтинг: 0Ответов: 1Опубликовано: 23.01.2023

Как создать проект с версией «compileSdkVersion 22» и «targetSdkVersion 22» и собрать его? Пытался создать данный проект но получаю кучу ошибок, а сам проект не запускается.

14 issues were found when checking AAR metadata:

  1. Dependency 'androidx.appcompat:appcompat-resources:1.5.1' requires libraries and applications that depend on it to compile against version 32 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 32, for example 32.

    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.appcompat:appcompat:1.5.1' requires libraries and applications that depend on it to compile against version 32 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 32, for example 32.

    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).

  3. Dependency 'androidx.activity:activity:1.5.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  4. Dependency 'androidx.lifecycle:lifecycle-viewmodel:2.5.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  5. Dependency 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

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

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  7. Dependency 'androidx.emoji2:emoji2-views-helper:1.2.0' requires libraries and applications that depend on it to compile against version 32 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 32, for example 32.

    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).

  8. Dependency 'androidx.emoji2:emoji2:1.2.0' requires libraries and applications that depend on it to compile against version 32 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 32, for example 32.

    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).

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

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  10. Dependency 'androidx.lifecycle:lifecycle-process:2.4.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  11. Dependency 'androidx.lifecycle:lifecycle-runtime:2.5.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  12. Dependency 'androidx.savedstate:savedstate:1.2.0' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  13. Dependency 'androidx.startup:startup-runtime:1.1.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

  14. Dependency 'androidx.lifecycle:lifecycle-livedata-core:2.5.1' requires libraries and applications that depend on it to compile against version 31 or later of the Android APIs.

    :app is currently compiled against android-22.

    Recommended action: Update this project to use a newer compileSdkVersion of at least 31, for example 32.

    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).

Ответы

▲ 0

Чтобы создать проект с версией «compileSdkVersion 22» и «targetSdkVersion 22» в Android Studio, вы должны сделать следующее:

  1. Откройте Android Studio и выберите «Create new project».
  2. Выберите «Empty Activity» в качестве шаблона проекта и нажмите «Next».
  3. Введите имя проекта и нажмите «Next».
  4. Выберите «API 22: Android 5.1 (Lollipop)» в качестве «Minimum SDK» и нажмите «Next».
  5. Выберите нужные опции и нажмите «Finish».

Проект будет создан с версией «compileSdkVersion 22» и «targetSdkVersion 22». Если вы все еще будете получать кучу ошибок проверьте, конфигурацию вашего проекта, и прочитайте сообщения об ошибках для их решения.