我一直在尝试使Storybook 3.4.4与React 0.57一起使用。我最近从0.55.4升级到了一切正常。
我还使用babel-upgrade工具升级到babel 7。
现在,当我尝试运行我的故事书时...
storybook start -p 7007
react-native run-android
我遇到以下错误...
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-vector-icons'.
Could not resolve all dependencies for configuration ':react-native-vector-icons:_debugPublishCopy'.
Could not find com.android.support:appcompat-v7:27.1.1.
Searched in the following locations:
file:/Users/[XXX]/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.pom
file:/Users/[XXX]/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
file:/Users/[MY PROJECT LOCATION]/android/sdk-manager/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
Required by:
boilerplate:react-native-vector-icons:unspecified > com.facebook.react:react-native:0.57.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 9.08 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
有人可以帮我吗?
答案 0 :(得分:0)
如果storybook start -p 7007
运行正常,则问题与babel
或storybook
无关。
在您的堆栈跟踪中,您的错误必须来自项目根目录下的build.gradle
。
确保依赖项中的Maven存储库正确。
您应该查看以下问题:https://github.com/react-community/lottie-react-native/issues/343