menu icon indicating copy to clipboard operation
menu copied to clipboard

Test build fails on [email protected] due to minSdkVersion 21

Open lluiscab opened this issue 1 year ago • 5 comments
trafficstars

[email protected] bumped the minSdkVersion to 23 (see release notes)

This library is still using minSdkVersion 21 as seen in: https://github.com/react-native-menu/menu/blob/5f47a7ff874f9b4474a32fef7a68bdf6d5fb7409/android/gradle.properties#L2 and https://github.com/react-native-menu/menu/blob/5f47a7ff874f9b4474a32fef7a68bdf6d5fb7409/android/build.gradle#L59 which is causing build issues on my project when building the app for testing.

Build error:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-menu_menu:processDebugAndroidTestManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [com.facebook.react:react-android:0.74.1] /<redacted>/.gradle/caches/transforms-4/e5b57f16c7e0461b8ffc655e3c736199/transformed/jetified-react-android-0.74.1-debug/AndroidManifest.xml as the library might be using APIs not available in 21
  	Suggestion: use a compatible library with a minSdk of at most 21,
  		or increase this project's minSdk version to at least 23,
  		or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)

lluiscab avatar May 09 '24 09:05 lluiscab

Same here. The build fails after upgrading to Expo SDK 51. I have the exact same error.

zxcodes avatar May 11 '24 05:05 zxcodes

Any progress on this issue? I seems like it's the only thing left blocking our update to [email protected]. If the only required changes are updating the minSdkVersion in build.gradle and gradle.properties, then I might have time to open a PR myself, but I'm not sure if those are the only required changes

lluiscab avatar May 22 '24 07:05 lluiscab

Any progress on this issue? I seems like it's the only thing left blocking our update to [email protected]. If the only required changes are updating the minSdkVersion in build.gradle and gradle.properties, then I might have time to open a PR myself, but I'm not sure if those are the only required changes

IMO, those are the only changes that you need to make. I'm currently using a fork of this library with those changes. I'm not sure if a PR for that would be considered since it might be a breaking change for the apps that target a lower SDK version.

zxcodes avatar May 23 '24 01:05 zxcodes

I'm not sure if a PR for that would be considered since it might be a breaking change for the apps that target a lower SDK version.

Given that [email protected] already bumps minSdkVersion to 23, I'd say that it's not that much of a problem, in any case he change could be published as a major release.

lluiscab avatar May 23 '24 06:05 lluiscab

I'm not sure if a PR for that would be considered since it might be a breaking change for the apps that target a lower SDK version.

Given that [email protected] already bumps minSdkVersion to 23, I'd say that it's not that much of a problem, in any case he change could be published as a major release.

Cool. A PR should do the job then.

zxcodes avatar May 23 '24 11:05 zxcodes