@Sam이 정확합니다. Event log
에서만 보이는 것은 매우 피상적입니다. 은 이벤트가 아닌 세부 정보 만 기록합니다. Gradle console
보면 모두를 명확히 :
여기
도 내가 컴파일하고있어 코드에서 오류가 무엇 Clean
입니다 :
Executing tasks:
[clean, :app:generateDebugSources, :app:mockableAndroidJar,
:app:prepareDebugUnitTestDependencies,
:app:generateDebugAndroidTestSources,
:app:compileDebugSources, :app:compileDebugUnitTestSources,
:app:compileDebugAndroidTestSources]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:app: preBuild UP-TO-DATE
(MY NOTE ^^^^^^^^
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library
:app:prepareComAndroidSupportAppcompatV72600Alpha1Library
:app:prepareComAndroidSupportConstraintConstraintLayout102Library
:app:prepareComAndroidSupportSupportCompat2600Alpha1Library
:app:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:app:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:app:prepareComAndroidSupportSupportFragment2600Alpha1Library
:app:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:app:prepareComAndroidSupportSupportV42600Alpha1Library
:app:prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportTestEspressoEspressoCore222Library
:app:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library
:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library
:app:prepareComAndroidSupportTestRules05Library
:app:prepareComAndroidSupportTestRunner05Library
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
Rebuild
는 모두 플러스 오류가에있다 경우 다음을 수행합니다 코드 :
:app:incrementalDebugJavaCompilationSafeguard
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\Users\Dov\Desktop\SQhell\app\src\main\java\com\dslomer64\sqhell\MainActivity.java:221: error: not a statement
x return true;
^
C:\Users\Dov\Desktop\SQhell\app\src\main\java\com\dslomer64\sqhell\MainActivity.java:221: error: ';' expected
x return true;
^
2 errors
:app:compileDebugJavaWithJavac FAILED
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.
BUILD FAILED
Total time: 16.398 secs
코드에 오류가없는 경우, Rebuild
이 수행합니다
,
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:incrementalDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebugUnitTest
:app:compileDebugUnitTestJavaWithJavac UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:processDebugUnitTestJavaRes UP-TO-DATE
:app:compileDebugUnitTestSources UP-TO-DATE
:app:incrementalDebugAndroidTestJavaCompilationSafeguard
:app:javaPreCompileDebugAndroidTest
:app:compileDebugAndroidTestJavaWithJavac
:app:compileDebugAndroidTestNdk UP-TO-DATE
:app:compileDebugAndroidTestSources
BUILD SUCCESSFUL
Total time: 26.83 secs
어떤 경우에도 Build
은 Clean
을 수행 한 다음 오류가 발견되면 (나열된 경우) 종료 코드를 컴파일합니다. 그렇지 않으면 전체 컴파일을 수행합니다.
따라서 Clean
는 Rebuild
과 다릅니다.
(이는 질문에 나열된 것과 같은 다른 게시물을 수정해야 함을 의미합니다.)