Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo build fails for specified SDK versions #41

Closed
topherauyeung opened this issue Aug 28, 2023 · 4 comments
Closed

Expo build fails for specified SDK versions #41

topherauyeung opened this issue Aug 28, 2023 · 4 comments

Comments

@topherauyeung
Copy link

Describe the bug
When I try to create an internal distribution build on Expo (non-development build), I'm getting this error around SDK versioning compatibility:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

---

- What went wrong:

Execution failed for task ':app:checkReleaseAarMetadata'.

> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction

> 3 issues were found when checking AAR metadata:

       1.  Dependency 'androidx.health.connect:connect-client:1.1.0-alpha03' 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.1 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-ktx:1.12.0-alpha05' 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.1 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).

       3.  Dependency 'androidx.core:core:1.12.0-alpha05' 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.1 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).

My app.config.js matches the config that the README specifies:

    plugins: [
      'react-native-health-connect',
      [
        'expo-build-properties',
        {
          android: {
            compileSdkVersion: 33,
            targetSdkVersion: 33,
            minSdkVersion: 26
          }
        }
      ]
    ],

When I bump to 34 on both compile and target, the build succeeds. I'm using the latest version of this library. Happy to open a PR to update the documentation if bumping the Sdk version is the correct solution!

@mphill
Copy link

mphill commented Sep 1, 2023

I think Android 14 is still technically beta. Targeting SDK level 34 has issues with other libraries like FlashList Shopify/flash-list#864

@matinzd matinzd removed the Type: bug label Sep 1, 2023
@matinzd
Copy link
Owner

matinzd commented Sep 1, 2023

Hi,

You need to compile alpha03 against SDK 34. If you want to have SDK 33 downgrade to previous versions.

I am going to close this issue for now.

@matinzd matinzd closed this as completed Sep 1, 2023
@mphill
Copy link

mphill commented Sep 1, 2023

@topherauyeung I’d say do your PR. The app will not compile with the current instructions.

@matinzd
Copy link
Owner

matinzd commented Sep 1, 2023

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants