Hata

2016-05-07 14 views
6

, bir hata veriyor:Hata

C:\workspace\two>cordova build android 
ANDROID_HOME=C:\Program Files\Android\android-sdk 
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_77 
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configur 
ation failure takes precedence. 
java.lang.IllegalStateException: buildToolsVersion is not specified. 
     at com.google.common.base.Preconditions.checkState(Preconditions.java:17 
6) 
     at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.jav 
a:599) 
     at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:566) 
     at com.android.build.gradle.BasePlugin$10$1.call(BasePlugin.java:563) 
     at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.ja 
va:55) 
     at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.ja 
va:47) 
     at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:562) 
     at com.android.build.gradle.BasePlugin$10.execute(BasePlugin.java:559) 
     at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.d 
ispatch(BroadcastDispatch.java:93) 
     at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.d 
ispatch(BroadcastDispatch.java:82) 
     at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(Abstract 
BroadcastDispatch.java:44) 
     at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatc 
h.java:79) 
     at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatc 
h.java:30) 
     at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocat 
ionHandler.invoke(ProxyDispatchAdapter.java:93) 
     at com.sun.proxy.$Proxy11.afterEvaluate(Unknown Source) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfte 
rEvaluate(LifecycleProjectEvaluator.java:67) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L 
ifecycleProjectEvaluator.java:61) 
     at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj 
ect.java:529) 
     at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj 
ect.java:90) 
     at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(Task 
PathProjectEvaluator.java:42) 
     at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil 
dConfigurer.java:35) 
     at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLa 
uncher.java:125) 
     at org.gradle.internal.Factories$1.create(Factories.java:22) 
     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul 
tBuildOperationExecutor.java:90) 
     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul 
tBuildOperationExecutor.java:52) 
     at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default 
GradleLauncher.java:122) 
     at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra 
dleLauncher.java:32) 
     at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl 
eLauncher.java:99) 
     at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl 
eLauncher.java:93) 
     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul 
tBuildOperationExecutor.java:90) 
     at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul 
tBuildOperationExecutor.java:62) 
     at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle 
Launcher.java:93) 
     at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun 
cher.java:82) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon 
troller.run(InProcessBuildActionExecuter.java:94) 
     at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe 
cuteBuildActionRunner.java:28) 
     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA 
ctionRunner.java:35) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce 
ssBuildActionExecuter.java:43) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce 
ssBuildActionExecuter.java:28) 
     at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin 
uousBuildActionExecuter.java:81) 
     at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin 
uousBuildActionExecuter.java:46) 
     at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBu 
ild.java:52) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build 
CommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(
WatchForDisconnection.java:37) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute 
(ResetDeprecationLogger.java:26) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon. 
execute(RequestStopIfSingleUsedDaemon.java:34) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Forw 
ardClientInput.java:74) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Forw 
ardClientInput.java:72) 
     at org.gradle.util.Swapper.swap(Swapper.java:38) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(For 
wardClientInput.java:72) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(
DaemonHealthTracker.java:47) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClien 
t.java:60) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build 
CommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBu 
ild(EstablishBuildEnvironment.java:72) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Build 
CommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(Hin 
tGCAfterBuild.java:41) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(
DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1. 
run(StartBuildOrRespondWithBusy.java:50) 
     at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(Daemon 
StateCoordinator.java:246) 
     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures. 
onExecute(ExecutorPolicy.java:54) 
     at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableE 
xecutorImpl.java:40) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. 
java:1142) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor 
.java:617) 
     at java.lang.Thread.run(Thread.java:745) 

FAILURE: Build failed with an exception. 

* Where: 
Script 'C:\workspace\two\platforms\android\CordovaLib\cordova.gradle' line: 64 

* What went wrong: 
A problem occurred evaluating root project 'android'. 
> No installed build tools found. Please install the Android build tools version 
19.1.0 or higher. 


BUILD FAILED 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output. 
Total time: 3.089 secs 
Error: Error code 1 for command: cmd with args: /s,/c,"C:\workspace\two\platform 
s\android\gradlew cdvBuildDebug -b C:\workspace\two\platforms\android\build.grad 
le -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" 

benim SDK tamamlandıktan ve yolun doğru olduğunu

enter image desciption here

Cordova Versiyon 6.1.1 Cordova Platformu ls Android 5.1.1

+1

u Config.xml dosya ekleyebilirsiniz ?? Bildiğim kadarıyla başına size android sdk güncellemek ve araçlarını oluşturmak lazım gibi Questi0n @ –

+0

.. Ayrıca hata – Gandhi

+0

http://stackoverflow.com/questions/38496747/illegalstateexceptionbuildtoolsversion üzerinde fazla bilgi almak için ayrıntılı modda yapı çalıştırın gerekebilir .Bu aynı konu – CodeWriter

cevap

0

için size th içinde gidince e CordovaLib kütüphane klasöründe (yol: platformları-> android-> CordovaLib) cordova.gradle dosyasını bulacaksınız.

bu dosyanın içinde gidince bu çizgiyi bulacaksınız: doFindLatestInstalledBuildTools ('19 .1.0')

bu hat cordova 6.xx araçları yukarıda 19.1.0 ya sürümünü kurmak gerektirdiğini belirtiyor sisteme yüklenecek. Bunu değiştirmek için tavsiye edilmedi.

Yüklediğiniz resme baktığımda, yüklenen resimdeki sisteminizde mevcut olmayan yükleme 19.1.0 veya üzeri'un daha iyi bir yol olacağını düşünüyorum. Sonra cordova sonucu almak için android inşa deneyin.

0

Merhaba güncelleme Config.xml dosya

<widget xmlns="http://www.w3.org/ns/widgets" 
     xmlns:cdv="http://cordova.apache.org/ns/1.0" 
     id="ch.papers.test" 
     version="1.0.0" 
     android-versionCode="1">