【发布时间】:2019-04-10 09:07:08
【问题描述】:
按照react-native-fbsdk的安装说明后,命令 react-native run-android 失败并出现以下错误:
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:compileDebugJavaWithJavac FAILED
C:\projects\veida\veida_v1\Erua3\android\app\src\main\java\com\erua3\MainActivity.java:12: error: cannot find symbol
public void onActivityResult(int requestCode, int resultCode, Intent data) {
^
symbol: class Intent
location: class MainActivity
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
24 actionable tasks: 1 executed, 23 up-to-date
error 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
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
我已经尝试重新安装 android studio 并按照安装步骤两次使用两个新项目。
我的 App.js 是默认的 App.js。我还尝试使用带有 facebook 登录的示例 App.js。
【问题讨论】:
标签: android facebook react-native react-native-fbsdk