2017-10-14 7 views
0

작업 실행을 구축하는 동안 : [클린] 수요에NDK에 "platforms"디렉토리가 누락되었습니다.

구성은 잠복기 기능입니다. NDK에 "platforms"디렉토리가 누락되었습니다. NDK를 사용하는 경우 ndk.dir이 을 유효한 NDK 디렉토리로 설정했는지 확인하십시오. 현재 /사용자/ishandutta2007/Library/Android/sdk/ndk-bundle로 설정되어 있습니다. NDK를 사용하지 않는 경우 ANDROID_NDK_HOME 또는 local.properties에서 NDK 변수를 설정 해제하여이 경고를 제거하십시오.

'': app '프로젝트의'compile '구성이 사용되지 않습니다. 대신 '구현' 을 사용하십시오.

FAILURE : 예외가 발생하여 빌드가 실패했습니다.

  • 문제점 : '프로젝트'구성 문제가 발생했습니다.

    java.lang.NullPointerException이 (오류 메시지)

  • 봅니다 : 더 로그 출력을 얻을 수 --info 또는 --debug 옵션을 실행합니다.

  • 예외는 다음과 같습니다. org.gradle.api.ProjectConfigurationException : ': app'프로젝트를 구성하는 중 문제가 발생했습니다. org.gradle.configuration에서 org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate (LifecycleProjectEvaluator.java:82) 에서 org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure (LifecycleProjectEvaluator.java:87)에서 . org.gradle.configuration.project.LifecycleProjectEvaluator $ ConfigureProject.run에서 project.LifecycleProjectEvaluator.doConfigure (LifecycleProjectEvaluator.java:69) 에서 org.gradle.configuration.project.LifecycleProjectEvaluator.access $ 50 (LifecycleProjectEvaluator.java:33) (LifecycleProjectEvaluator.java:103) at org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuil org.gradle.internal.progress.DefaultBuildOperationExecutor.execute에서 org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:328) (DefaultBuildOperationExecutor에서 dOperationWorker.execute (DefaultBuildOperationExecutor.java:336) . 자바 : 197) org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate (LifecycleProjectEvaluator.java:49) 에서 org.gradle.internal.progress.DefaultBuildOperationExecutor.run (DefaultBuildOperationExecutor.java:107) 에서 에서 조직도 .gradle.api.internal.project.DefaultProject.evaluate (DefaultProject.java:651) at org org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy에서 .gradle.api.internal.project.DefaultProject.evaluate org.gradle.execution.TaskPathProjectEvaluator.configure (TaskPathProjectEvaluator.java:35)에서 (DefaultProject.java:133) (TaskPathProjectEvaluator.java:62) at org.gradle.execution.TaskSelector.getSelection (TaskSelector.java:100) at org.gradle.execution.TaskSelector.getSelection (TaskSelector.자바 : 81) org.gradle.execution.commandline.CommandLineTaskParser.parseTasks (CommandLineTaskParser.java:42) 에서 org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure (TaskNameResolvingBuildConfigurationAction.java:44 AT)에서 org.gradle .execution.DefaultBuildConfigurationActionExecuter.configure (DefaultBuildConfigurationActionExecuter.java:48) 에서 org.gradle.execution.DefaultBuildConfigurationActionExecuter.access $ 000 (DefaultBuildConfigurationActionExecuter.java:25) org.gradle.execution.DefaultBuildConfigurationActionExecuter $ 1.proceed에서 (DefaultBuildConfigurationActionExecuter.java : 54) at org.gra dle.execution.DefaultTasksBuildExecutionAction.configure org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure (DefaultBuildConfigurationActionExecuter.java:48)에서 (DefaultTasksBuildExecutionAction.java:44) 에서 org.gradle.execution.DefaultBuildConfigurationActionExecuter.access $ 000 (DefaultBuildConfigurationActionExecuter.java : 25) 에서 org.gradle.execution.DefaultBuildConfigurationActionExecuter $ 1.proceed org.gradle.execution에서 org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure (ExcludedTaskFilteringBuildConfigurationAction.java:47에서 (DefaultBuildConfigurationActionExecuter.java:54) ) .DefaultBuildConfigurationActionExecuter.configure (De faultBuildConfigurationActionExecuter.java:48) org.gradle.initialization.DefaultGradleLauncher $ CalculateTaskGraph.run (DefaultGradleLauncher.java:265) 에서 org.gradle.execution.DefaultBuildConfigurationActionExecuter.select (DefaultBuildConfigurationActionExecuter.java:36) 에서 에서 조직 org.gradle.internal에서 org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:328) 에서 .gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:336) .progress.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:197) org.gradle.initialization.DefaultGradleLauncher.constructTaskGraph (DefaultGradleLauncher.java:173)에서 org.gradle.internal.progress.DefaultBuildOperationExecutor.run (DefaultBuildOperationExecutor.java:107) 에서 에서org.gradle.initialization.DefaultGradleLauncher org.gradle.internal.invocation.GradleBuildController $ 1.call에서 .doBuildStages (DefaultGradleLauncher.java:128) 에서 org.gradle.initialization.DefaultGradleLauncher.executeTasks (DefaultGradleLauncher.java:107) (GradleBuildController.java:78) at org.gradle.internal.invocation.GradleBuildController $ 1.call (GradleBuildController.java:75) at org.gradle.internal.invocation에서 org.gradle.internal.work.DefaultWorkerLeaseService.withLocks org.gradle.internal.invocation.GradleBuildController.doBuild (GradleBuildController.java:100)에서 (DefaultWorkerLeaseService.java:152) org.gradle.launcher.exec.ChainingBuildActionRunner.run에서 .GradleBuildController.run org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run (BuildModelActionRunner.java:53)에서 (GradleBuildController.java:75) (ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.ChainingBuildActionRunner.run (ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run (ValidatingBuildActionRunner.java:32) org.gradle.internal.progress.DefaultBuildOperationExecutor에서 org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner의 $의 1.run (RunAsBuildOperationBuildActionRunner.java:43) 에서 org.gradle.internal.progress.DefaultBuildOperationExecutor.execute에서 org.gradle.internal.progress.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:328) 에서 $ RunnableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:336) (DefaultBuildOperationExecutor .java : 197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run (DefaultBuildOp org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run에서 org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run (RunAsBuildOperationBuildActionRunner.java:40) 에서 erationExecutor.java:107) (SubscribableBuildActionRunner.java:51) org.gradle.launcher에서 org.gradle.launcher.exec.InProcessBuildActionExecuter.execute (InProcessBuildActionExecuter.java:29)에서 org.gradle.launcher.exec.InProcessBuildActionExecuter.execute (InProcessBuildActionExecuter.java:45) 에서 .exec.BuildTreeScopeBuildActionExecuter.execute (BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeB org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute에서 uildActionExecuter.execute org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute (ContinuousBuildActionExecuter.java:71)에서 (BuildTreeScopeBuildActionExecuter.java:25) ( org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute (ServicesSetupBuildActionExecuter.java에서 org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute (ServicesSetupBuildActionExecuter.java:51) 에서 ContinuousBuildActionExecuter.java:45) : 32) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute (GradleThreadBuildActionExecuter.java:36) 에서 org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute (ParallelismConfigurationBuildActionExecuter.java:43) 에서 org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute (GradleThreadBuildActionExecuter.java:25) 에서조직도 org.gradle.tooling에서 .gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute (StartParamsValidatingActionExecuter.java:64)에서 (ParallelismConfigurationBuildActionExecuter.java:29) .internal.provider.StartParamsValidatingActionExecuter.execute (StartParamsValidatingActionExecuter.java:29) 에서 org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute (SessionFailureReportingActionExecuter.java:42) 에서 org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute (SessionFailureReportingActionExecuter.java:55) 에서 53,691,363,210 조직도 .gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute org.gradle.launcher에서 org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute (SetupLoggingActionExecuter.java:33)에서 (SetupLoggingActionExecuter.java:58) .daemon.server.exec.ExecuteBuild.doBuild (ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly. org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120)에서 (BuildCommandOnly.java:36) org.gradle.launcher.daemon.server.exec.WatchForDisconnection에서 실행한다. org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120)에서 (WatchForDisconnection.java:37) org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger에서 실행. 실행 org.gradle.launcher.daemon.server.exec.RequestStopIfSing에서 org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120)에서 (ResetDeprecationLogger.java:26) leUsedDaemon.execute org.gradle.launcher.daemon.server.exec에서 org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120) 에서 (RequestStopIfSingleUsedDaemon.java:34). ForwardClientInput $ 2.call (ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput $ 2.call (ForwardClientInput.java:72) at org.gradle.util.Swapper.swap (Swapper .java : 38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute (ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution. java : 120) at org.g radle.launcher.daemon.server.exec.LogAndCheckHealth.execute 조직에서 org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120) 에서 (LogAndCheckHealth.java:55). gradle.launcher.daemon.server.exec.LogToClient.doBuild 조직에서 org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute (BuildCommandOnly.java:36) 에서 (LogToClient.java:62). gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed 조직에서 org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild (EstablishBuildEnvironment.java:82) 에서 (DaemonCommandExecution.java:120) . gradle.launcher.daemon.se rver.exec.BuildCommandOnly.execute org.gradle.launcher.daemon에서 org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed (DaemonCommandExecution.java:120) 에서 (BuildCommandOnly.java:36). server.exec.StartBuildOrRespondWithBusy $의 1.run (StartBuildOrRespondWithBusy.java:50) org.gradle.internal.concurrent에서 $ 1.run (DaemonStateCoordinator.java:297) 에서 org.gradle.launcher.daemon.server.DaemonStateCoordinator. org.gradle.internal.concurrent.ThreadFac에서 ExecutorPolicy $ CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63) 에서 org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run (ManagedExecutorImpl.java:46) com.android.build에서 com.google.common.base.Preconditions.checkNotNull (Preconditions.java:782) 에서 java.lang.NullPointerException이 :에 의한 toryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl.java:55) . gradle.internal.ndk.NdkHandler.getPlatformVersion (NdkHandler.java:158) com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits (NdkHandler.java:331) com.android.build에서 에서 . gradle.internal.ndk.NdkHandler.getSupportedAbis com.android.build.gradle에서 com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create (ExternalNativeJsonGenerator.java:609) 에서 (NdkHandler.java:397) . 내부.createExternalNativeBuildJsonGenerators com.android.build.gradle.internal.ApplicationTaskManager.lambda $ createTasksForVariantScope에서 (TaskManager.java:1532) com.android.builder.profile.ThreadRecorder.record (ThreadRecorder에서 $ 10 조 (ApplicationTaskManager.java:205) 된 .java : 81) com.android.build.gradle.internal.VariantManager.createTasksForVariantData에서 com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope (ApplicationTaskManager.java:200)에서 (VariantManager.java:523) at com.android.build.gradle.internal.VariantManager.lambda $ createAndroidTasks $ 1 (VariantManager.java:338) at com.android.bui lder.profile.ThreadRecorder.record (ThreadRecorder.java:81) com.android.build.gradle.internal.VariantManager.createAndroidTasks (VariantManager.java:334) com.android.build.gradle.BasePlugin 에서 에서 . 람다 $ 5 $ createAndroidTasks com.android.build.gradle.BasePlugin.createAndroidTasks에서 com.android.builder.profile.ThreadRecorder.record (ThreadRecorder.java:81)에서 (BasePlugin.java:627) (BasePlugin.java : 622)에 com.android.builder.profile.ThreadRecorder.record (ThreadRecorder.java:81에서 com.android.build.gradle.BasePlugin.lambda $ 널 $ 3 (BasePlugin.java:549) )에서 com.android.build.gradle.BasePlugin.lambda $ createTasks $ 4 (BasePlugin.java:545) org.gradle에서 org.gradle.internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch (BroadcastDispatch.java:91) 에서 org.gradle.internal.event.BroadcastDispatch에서 .internal.event.BroadcastDispatch $ ActionInvocationHandler.dispatch org.gradle.internal.event.AbstractBroadcastDispatch.dispatch (AbstractBroadcastDispatch.java:42)에서 (BroadcastDispatch.java:80) $ SingletonDispatch.dispatch (BroadcastDispatch.java:230) at org.gradle.internal.event.BroadcastDispatch $ SingletonDispatch.dispatch (BroadcastDispatch.java:149) at org.gradle.intern org.gradle.internal.event.BroadcastDispatch $에서 org.gradle.internal.event.BroadcastDispatch $ CompositeDispatch.dispatch (BroadcastDispatch.java:324) 에서 al.event.AbstractBroadcastDispatch.dispatch (AbstractBroadcastDispatch.java:58) org.gradle.internal.event.ListenerBroadcast.dispatch (ListenerBroadcast.java에서 CompositeDispatch.dispatch org.gradle.internal.event.ListenerBroadcast.dispatch (ListenerBroadcast.java:140)에서 (BroadcastDispatch.java:234) : 37) at org.gradle.internal.dispatch.ProxyDispatchAdapter $ DispatchingInvocationHandler.invoke (ProxyDispatchAdapter.java:93) (com.sun.proxy) $ Proxy23.afterEvaluate (알 수없는 소스) ()org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate (LifecycleProjectEvaluator.java:75) ... 더

  • 95 https://help.gradle.org

BUILD는 3S

에 실패 더 많은 지원을받을 수

빌드.Gradle을 (프로젝트)

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     google() 
     jcenter() 
    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-beta2' 
    } 
} 

allprojects { 
    repositories { 
     google() 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

build.gradle (응용 프로그램) :

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '26.0.1' 
    defaultConfig { 
     applicationId 'org.tensorflow.demo' 
     minSdkVersion 21 
     targetSdkVersion 26 
     versionCode 1 
     versionName '1.0' 

     externalNativeBuild { 
      cmake { 
       cppFlags "" 
      } 
     } 
     ndk { 
      abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' 
     } 
    } 

    externalNativeBuild { 
     cmake { 
      path "CMakeLists.txt" 
     } 
    } 
} 

dependencies { 
    compile 'org.tensorflow:tensorflow-android:1.3.0' 
} 

안드로이드 스튜디오 : 필요에 따라 2.3.3

+0

[안드로이드 스튜디오를 고치는 방법 2.3 NDK bug?] (https://stackoverflow.com/questions/42682357/how-to-fix-android-studios-2-3-ndk-bug) – ishandutta2007

+0

시도해보기 'compileSdkVersion'을 설정하십시오 ** ** "android-26"** ** –

+0

당신을 얻지 못했습니다, 이미 26입니다. – ishandutta2007

답변

0

구성은 잠복기 기능입니다. NDK에 "platforms"디렉토리가 누락되었습니다.

NDK를 사용하는 경우 ndk.dir이 유효한 NDK 디렉토리로 설정되어 있는지 확인하십시오.

현재 C:\Users\MSI\AppData\Local\Android\Sdk\ndk-bundle으로 설정되어 있습니다.

NDK를 사용하지 않는 경우이 경고를 제거하려면 NDK 변수를 ANDROID_NDK_HOME 또는 local.properties에서 설정 해제하십시오.

+0

이 문제를 해결할 수 있습니까? –