maniac-tech / react-native-expo-read-sms

Library to read incoming SMS in Android for Expo (React Native)
https://react-native-expo-read-sms.vercel.app/
MIT License
54 stars 21 forks source link

Gradle build is failing for lib v5.1.0 #53

Closed maniac-tech closed 3 months ago

maniac-tech commented 3 months ago

Describe the bug Gradle builds fail on expo clouds

To Reproduce Steps to reproduce the behavior:

  1. Import the latest version of 5.1.0
  2. Build the application

Expected behavior The build should successfully complete

Gradle log

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:processDebugMainManifest'.

> Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 33 declared in library [:maniac-tech_react-native-expo-read-sms] /home/expo/workingdir/build/node_modules/@maniac-tech/react-native-expo-read-sms/android/build/intermediates/merged_manifest/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 33,

        or use tools:overrideLibrary="com.reactlibrary" to force usage (may lead to runtime failures)

* 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 4m 31s

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
maniac-tech commented 3 months ago

Fixed with Gradle v8 support PR.

AlirezaFereydoni commented 3 months ago

I get this error on expo 51.0.21 with gradle version 8.6

` Could not resolve all task dependencies for configuration ':maniac-tech_react-native-expo-read-sms:classpath'.

Could not resolve com.android.tools.build:gradle:8.0.0. Required by: project :maniac-tech_react-native-expo-read-sms`

is it a way to fix it without downgrading my gradle ?