gpt4 book ai didi

android-studio - Android Studio 错误 :Failed to resolve: com. facebook.react :react-native:+?

转载 作者:行者123 更新时间:2023-12-03 14:50:02 24 4
gpt4 key购买 nike

我正在尝试使用 Android Studio 来帮助开发 react 原生 Android 桥接模块。

如何解决此错误?

Error:Failed to resolve: com.facebook.react:react-native:+

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find any version that matches com.facebook.react:react-native:+.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/facebook/react/react-native/
file:/Users/edward3/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/edward3/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/
file:/Users/edward3/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/edward3/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/
Required by:
:android:unspecified

我使用 Android Studio 打开了/MyBridgeModule/android/文件夹。

我的 build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
lintOptions {
warning 'InvalidPackage'
}
}

dependencies {
compile "com.facebook.react:react-native:+"
}

提前致谢,

最佳答案

这在使用 + 时是可能的引用版本。下线时尽量使用特定版本+可能不适用于 android studio 中的 Offine gradle build,或者这可以引用这个问题 GitHub Issue referene to same

关于android-studio - Android Studio 错误 :Failed to resolve: com. facebook.react :react-native:+?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38852653/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com