expo-app-auth’ -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

huangapple go评论65阅读模式
英文:

expo-app-auth' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

问题

我在尝试从我的 expo-app-auth/android/build.gradle 构建项目时收到了以下错误。在构建时如何清除这个错误?我认为我几乎尝试了所有在线找到的解决方案。

> 配置项目:react-native-reanimated
找到了 react-native-reanimated 的 AAR 文件
/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-71-hermes.aar

FAILURE: 生成失败,发生异常。

* 出现了什么问题:

Android Gradle 插件仅支持 Kotlin Gradle 插件版本 1.5.20 及更高版本。

以下依赖项不满足所需版本:

project ':expo-app-auth' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

* 尝试:

> 使用 --stacktrace 选项运行以获取堆栈跟踪。

repositories {
  maven {
    url = uri("https://plugins.gradle.org/m2/")
  }
}

dependencies {
  classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
}

apply(plugin = "org.jetbrains.kotlin.android")
英文:

I received the below error when trying to build my project from my expo-app-auth/android/build.grandle. how to clear this error when building? I think I've tried almost all solutions found online.

> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-71-hermes.aar

FAILURE: Build failed with an exception.

* What went wrong:

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.

The following dependencies do not satisfy the required version:

project ':expo-app-auth' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

* Try:

> Run with --stacktrace option to get the stack trace.



  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }

  dependencies {
  
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
  }
}

apply(plugin = "org.jetbrains.kotlin.android")

答案1

得分: 0

我通过从 Expo 48 升级到 Expo 49 来解决了这个问题。

英文:

I solved this issue by upgrding from expo 48 to expo 49

答案2

得分: 0

解决 Expo-app-auth 依赖错误

此错误是由于 expo-app-auth 依赖已被弃用而引起的。

解决方法:

  1. 进入 node_modules 文件夹,找到 expo-app-auth 文件夹并删除;
  2. 打开 package.json 文件并删除提到的依赖项;
  3. 然后运行 yarnnpm install 以安装或移除依赖项。

注意: 如果问题仍然存在且依赖项仍然在 package.json 中,请重复上述步骤,但这次检查是否有其他库、包或依赖项使用了 expo-app-auth。如果有,请同时删除这些包,因为它们可能也已过时。

英文:

Resolving Expo-app-auth Dependency Error

This error occurs due to the expo-app-auth dependency being deprecated.

How ​​to solve:

  1. Access the node_modules folder, locate the expo-app-auth folder and
    remove it;
  2. Open the package.json file and delete the mentioned dependency;
  3. Then run yarn or npm install to install or remove dependencies.

Note: If the problem persists and the dependency is still in package.json, repeat the steps above, but this time check if you have other libraries, packages or dependencies that use expo-app-auth . If so, also remove those packages, as they may also be (possibly) deprecated.

答案3

得分: 0

This issue could be fixed by upgrading from expo 48 to expo 49.

To upgrade the project run these two commands:

  1. npm install expo@^49.0.6
  2. npx expo install --fix

The second command is important because it will automatically upgrade react-native from 0.71.* to 0.72.*

See the official docs for more details.

英文:

This issue could be fixed by upgrading from expo 48 to expo 49.

To upgrade the project run these two commands:

  1. npm install expo@^49.0.6
  2. npx expo install --fix

The second command is important because it will auomatically upgrade react-native from 0.71.* to 0.72.*

See the official docs for more details.

huangapple
  • 本文由 发表于 2023年5月21日 04:13:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76297177.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定