0

我一直在尝试让 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

谁能帮帮我?

4

1 回答 1

0

如果storybook start -p 7007运行良好,则该问题与babelnor 无关storybook

从您的堆栈跟踪中,您的错误必须来自build.gradle项目的根目录。

确保您的依赖项中有正确的 Maven 存储库。

你应该看看这个问题:https ://github.com/react-community/lottie-react-native/issues/343

于 2018-09-27T10:38:59.583 回答