react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

Android build error on latest version [email protected]

Open dgrover-spotnana opened this issue 2 months ago • 25 comments

What react-native version are you using? 0.72.12

What react-native-pdf version are you using? 6.7.5

What react-native-blob-util version are you using? 0.19.9

What platform does your issue occur on? (android/ios/both) android

Describe your issue as precisely as possible :

  1. Steps to reproduce the issue or to explain in which case you get the issue
yarn add react-native-pdf react-native-blob-util
yarn android
  1. Interesting logs
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkStagingDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
 > 2 issues were found when checking AAR metadata:
   
     1.  Dependency 'androidx.core:core-ktx:1.12.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.core:core:1.12.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).

dgrover-spotnana avatar Apr 25 '24 16:04 dgrover-spotnana

Getting same error!

k-saparia avatar Apr 28 '24 16:04 k-saparia

I also meet the issue Do i need upgrade my compilSDK version?

tmKnight01 avatar Apr 29 '24 04:04 tmKnight01

I am also facing the same issue. Any resolution made?

prashanthkumar1993 avatar Apr 30 '24 03:04 prashanthkumar1993

I was getting the same error. I tried update compileSdkVersion to 34, but I had some problems with kotlin version. I prefered use a previous version and it is working fine.

Lucasmg37 avatar Apr 30 '24 18:04 Lucasmg37

the build succeed when i change minSdk to 24, but i don't want to change

Kaung-Htet-Hein avatar May 03 '24 09:05 Kaung-Htet-Hein

Is there any solution?

khokanuzzman avatar May 05 '24 08:05 khokanuzzman

the build succeed when i change minSdk to 24, but i don't want to change

not working for me.

khokanuzzman avatar May 05 '24 08:05 khokanuzzman

the build succeed when i change minSdk to 24, but i don't want to change

not working for me.

can you try changing compileSDK and targetSDK to 34?

Kaung-Htet-Hein avatar May 06 '24 02:05 Kaung-Htet-Hein

the build succeed when i change minSdk to 24, but i don't want to change

not working for me.

can you try changing compileSDK and targetSDK to 34?

which gradle version did you use? i am using gradle-7.5.1-all.zip

khokanuzzman avatar May 06 '24 05:05 khokanuzzman

Yes, it's working. I have just changed the compile SDK to 34.

khokanuzzman avatar May 06 '24 06:05 khokanuzzman