簡體   English   中英

所以我目前正在嘗試將應用程序上傳到 PlayStore,但我需要將我的反應原生項目從 api lvl 28 升級到 29

[英]So I am currently trying to upload an app to PlayStore but I need to upgrade my react native project from api lvl 28 to 29

So I am trying to upgrade my react native project from API level 28 to 29 and I have android studio but there are a lot of build.gradle folders under different expo folders. 誰能告訴我是否必須將每個文件夾更改為 29 或特定文件夾? 順便問一下,我如何在 android 工作室中同步 gradle? 我不知道版本,但我在 2021 年 4 月 25 日得到了它。我的項目使用的是 SDK 37.0.0,因為某些功能在其他 SDK 中不起作用。

請按照以下步驟操作:-

  • 在你的 React Native 項目中打開android/build.gradle
  • 然后將compileSdkVersiontargetSdkVersion值增加到29

android/build.gradle

   buildscript {
       ext {
           buildToolsVersion = "28.0.3"
           minSdkVersion = 16
           compileSdkVersion = 29
           targetSdkVersion = 29
       }
       // ...
   }

   allprojects {
    // ...
   }
  • 然后在 Android Studio 中,運行“與 Gradle 文件同步項目”( File > Sync Project with Gradle Files )。

你應該准備好了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM