我试图在Android模拟器上运行我的react本机应用程序时出现以下错误 . 我可以验证 $android_home 并使用sdk管理器工具安装了sdk v23 .
$ echo $ANDROID_HOME
/usr/local/opt/android-sdk
$ react-native run-android --stacktrace --info
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug --stacktrace --info)...
Starting Build
Settings evaluated using settings file '/Users/harrymoreno/programming/contactsPro/android/settings.gradle'.
Projects loaded. Root project using build file '/Users/harrymoreno/programming/contactsPro/android/build.gradle'.
Included projects: [root project 'contactsPro', project ':app']
Evaluating root project 'contactsPro' using build file '/Users/harrymoreno/programming/contactsPro/android/build.gradle'.
Evaluating project ':app' using build file '/Users/harrymoreno/programming/contactsPro/android/app/build.gradle'.
Creating configuration compile.
Creating configuration apk.
Creating configuration provided.
Creating configuration wearApp.
Creating configuration androidTestCompile.
Creating configuration androidTestApk.
Creating configuration androidTestProvided.
Creating configuration androidTestWearApp.
Creating configuration testCompile.
Creating configuration testApk.
Creating configuration testProvided.
Creating configuration testWearApp.
Creating configuration debugCompile.
Creating configuration debugApk.
Creating configuration debugProvided.
Creating configuration debugWearApp.
Creating configuration testDebugCompile.
Creating configuration testDebugApk.
Creating configuration testDebugProvided.
Creating configuration testDebugWearApp.
Creating configuration releaseCompile.
Creating configuration releaseApk.
Creating configuration releaseProvided.
Creating configuration releaseWearApp.
Creating configuration testReleaseCompile.
Creating configuration testReleaseApk.
Creating configuration testReleaseProvided.
Creating configuration testReleaseWearApp.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1
* Try:
Run with --debug option to get more log output.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:487)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:85)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:90)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:50)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:27)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.IllegalStateException: failed to find Build Tools revision 23.0.1
at com.android.builder.sdk.DefaultSdkLoader.getTargetInfo(DefaultSdkLoader.java:93)
at com.android.build.gradle.internal.SdkHandler.initTarget(SdkHandler.java:89)
at com.android.build.gradle.BasePlugin.ensureTargetSetup(BasePlugin.groovy:507)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.groovy:455)
at com.android.build.gradle.BasePlugin$_createTasks_closure13_closure17.doCall(BasePlugin.groovy:415)
at com.android.build.gradle.BasePlugin$_createTasks_closure13_closure17.doCall(BasePlugin.groovy)
at com.android.build.gradle.internal.profile.SpanRecorders$2.call(SpanRecorders.groovy:52)
at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:48)
at com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.groovy:54)
at com.android.build.gradle.BasePlugin$_createTasks_closure13.doCall(BasePlugin.groovy:414)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:87)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy11.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
... 33 more
BUILD FAILED
Total time: 3.529 secs
Stopped 0 compiler daemon(s).
Could not install the app on the device, see the error above.