"增量式java编译是一种孵化功能。"每个cordova构建过程花费的时间太长

时间:2016-08-08 08:57:50

标签: cordova gradle visual-studio-2015 taco

每次构建Cordova项目时,构建过程都会停留大约8分钟 发生这种情况时,日志中的最后一行是:Incremental java compilation is an incubating feature.

有人看到过这种情况吗?

我正在使用Visual Studio 2015并且正在运行Windows 10 build 14393.10。

我的问题是为什么构建过程需要太长时间?

更新

这是构建日志:

1>------ Build started: Project: bazimTest, Configuration: Release Android ------
1>  Your environment has been set up for using Node.js 4.4.7 (x64) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac
1>  ------ Name from source package.json: vs-tac
1>  ------ Version from source package.json: 1.0.42
1>  ------ Package already installed globally at correct version.
1>  ------ Cordova tools 6.3.0 already installed.
1>  ------ Build Settings:
1>  ------ Build Settings:
1>  ------    platformConfigurationBldDir: C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bld\Android\Release
1>  ------    platformConfigurationBinDir: C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bin\Android\Release
1>  ------    buildCommand: build
1>  ------    platform: Android
1>  ------    cordovaPlatform: android
1>  ------    configuration: Release
1>  ------    cordovaConfiguration: Release
1>  ------    projectName: bazimTest
1>  ------    projectSourceDir: C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest
1>  ------    npmInstallDir: C:\Users\poury\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9
1>  ------    buildTarget: AndroidEmulator
1>  ------    language: en-US
1>  ------ Platform android already exists
1>  ------ Copying native files from C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\res\native\android to platforms\android
1>  ------ Done copying native files to platforms\android
1>  ------ Updating plugins
1>  ------ Currently installed plugins: cordova-plugin-network-information@1.2.1,cordova-plugin-screen-orientation@1.4.2,cordova-plugin-statusbar@2.1.3,cordova-plugin-x-toast@2.5.2,de.appplant.cordova.plugin.local-notification@0.8.4,cordova-plugin-whitelist@1.2.2
1>  ------ Currently installed dependent plugins: cordova-plugin-device@1.1.2,cordova-plugin-app-event@1.2.0
1>  ------ Currently configured plugins:
1>  ------ Preparing platform: android
1>  No scripts found for hook "before_build".
1>  No scripts found for hook "before_prepare".
1>  Checking config.xml for saved platforms that haven't been added to the project
1>  Checking for any plugins added to the project that have not been installed in android platform
1>  No differences found between plugins added to project and installed in android platform. Continuing...
1>  Generating platform-specific config.xml from defaults for android at C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\res\xml\config.xml
1>  Merging project's config.xml into platform-specific android config.xml
1>  Found "merges/android" folder. Copying its contents into the android project.
1>  Merging and updating files from [www, platforms\android\platform_www, merges\android] to platforms\android\assets\www
1>    delete platforms\android\assets\www\VSBuildInfo.xml (no source)
1>  Wrote out android application name "bazimTest" to C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\res\values\strings.xml
1>  android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
1>  Wrote out Android package name "io.cordova.myapp972cd0" to C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\src\io\cordova\myapp972cd0\MainActivity.java
1>  Updating icons at platforms\android\res
1>  Updating splash screens at platforms\android\res
1>  Prepared android project successfully
1>  No scripts found for hook "after_prepare".
1>  Checking config.xml for saved plugins that haven't been added to the project
1>  ------ Copied C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bin\Android\Release\VSBuildInfo.xml to platforms\android\assets\www\VSBuildInfo.xml
1>  ------ Building platform: android
1>  Release
1>  ------ Build configuration options: --release
1>  No scripts found for hook "before_compile".
1>  ANDROID_HOME=C:\Android_SDKs
1>  JAVA_HOME=C:\Program Files\Java\jdk1.8.0_92
1>  Reading build config file: C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\build.json
1>MSBUILD : cordova-build warning : Warning: 'keystore' and 'alias' need to be specified to generate a signed archive.
1>MDAVSCLI : warning : 'keystore' and 'alias' need to be specified to generate a signed archive.
1>  Running command: cmd "/s /c ""C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\gradlew.bat" cdvBuildRelease -b "C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true""
1>  Starting a new Gradle Daemon for this build (subsequent builds will be faster).
1>  Incremental java compilation is an incubating feature.
1>  :preBuild UP-TO-DATE
1>  :preReleaseBuild UP-TO-DATE
1>  :checkReleaseManifest
1>  :CordovaLib:preBuild UP-TO-DATE
1>  :CordovaLib:preReleaseBuild UP-TO-DATE
1>  :CordovaLib:compileReleaseNdk UP-TO-DATE
1>  :CordovaLib:compileLint
1>  :CordovaLib:copyReleaseLint UP-TO-DATE
1>  :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
1>  :CordovaLib:packageReleaseRenderscript UP-TO-DATE
1>  :CordovaLib:checkReleaseManifest
1>  :CordovaLib:prepareReleaseDependencies
1>  :CordovaLib:compileReleaseRenderscript UP-TO-DATE
1>  :CordovaLib:generateReleaseResValues UP-TO-DATE
1>  :CordovaLib:generateReleaseResources UP-TO-DATE
1>  :CordovaLib:packageReleaseResources UP-TO-DATE
1>  :CordovaLib:compileReleaseAidl UP-TO-DATE
1>  :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
1>  :CordovaLib:mergeReleaseShaders UP-TO-DATE
1>  :CordovaLib:compileReleaseShaders UP-TO-DATE
1>  :CordovaLib:generateReleaseAssets UP-TO-DATE
1>  :CordovaLib:mergeReleaseAssets UP-TO-DATE
1>  :CordovaLib:processReleaseManifest UP-TO-DATE
1>  :CordovaLib:processReleaseResources UP-TO-DATE
1>  :CordovaLib:generateReleaseSources UP-TO-DATE
1>  :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
1>  :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
1>  :CordovaLib:processReleaseJavaRes UP-TO-DATE
1>  :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
1>  :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
1>  :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
1>  :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
1>  :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
1>  :CordovaLib:bundleRelease UP-TO-DATE
1>  :prepareAndroidCordovaLibUnspecifiedReleaseLibrary
1>  :preDebugBuild UP-TO-DATE
1>  :CordovaLib:preDebugBuild UP-TO-DATE
1>  :CordovaLib:compileDebugNdk UP-TO-DATE
1>  :CordovaLib:copyDebugLint UP-TO-DATE
1>  :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
1>  :CordovaLib:packageDebugRenderscript UP-TO-DATE
1>  :CordovaLib:checkDebugManifest
1>  :CordovaLib:prepareDebugDependencies
1>  :CordovaLib:compileDebugRenderscript UP-TO-DATE
1>  :CordovaLib:generateDebugResValues UP-TO-DATE
1>  :CordovaLib:generateDebugResources UP-TO-DATE
1>  :CordovaLib:packageDebugResources UP-TO-DATE
1>  :CordovaLib:compileDebugAidl UP-TO-DATE
1>  :CordovaLib:generateDebugBuildConfig UP-TO-DATE
1>  :CordovaLib:mergeDebugShaders UP-TO-DATE
1>  :CordovaLib:compileDebugShaders UP-TO-DATE
1>  :CordovaLib:generateDebugAssets UP-TO-DATE
1>  :CordovaLib:mergeDebugAssets UP-TO-DATE
1>  :CordovaLib:processDebugManifest UP-TO-DATE
1>  :CordovaLib:processDebugResources UP-TO-DATE
1>  :CordovaLib:generateDebugSources UP-TO-DATE
1>  :CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
1>  :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
1>  :CordovaLib:processDebugJavaRes UP-TO-DATE
1>  :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
1>  :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
1>  :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
1>  :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
1>  :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
1>  :CordovaLib:bundleDebug UP-TO-DATE
1>  :prepareComAndroidSupportSupportV42411Library UP-TO-DATE
1>  :prepareReleaseDependencies
1>  :compileReleaseAidl
1>  :compileReleaseRenderscript
1>  :generateReleaseBuildConfig
1>  :mergeReleaseShaders
1>  :compileReleaseShaders
1>  :generateReleaseAssets
1>  :mergeReleaseAssets
1>  :generateReleaseResValues
1>  :generateReleaseResources
1>  :mergeReleaseResources
1>  :processReleaseManifest
1>  :processReleaseResources
1>  :generateReleaseSources
1>  :incrementalReleaseJavaCompilationSafeguard
1>  :compileReleaseJavaWithJavac
1>  :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
1>  :compileReleaseNdk UP-TO-DATE
1>  :compileReleaseSources
1>  :lintVitalRelease
1>  :prePackageMarkerForRelease
1>  :transformClassesWithDexForRelease
1>  To run dex in process, the Gradle daemon needs a larger heap.
1>  It currently has approximately 455 MB.
1>  For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
1>  To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
1>  For more information see https://docs.gradle.org/current/userguide/build_environment.html
1>
1>
1>  :mergeReleaseJniLibFolders
1>  :transformNative_libsWithMergeJniLibsForRelease
1>  :processReleaseJavaRes UP-TO-DATE
1>  :transformResourcesWithMergeJavaResForRelease
1>  :packageRelease
1>  :assembleRelease
1>  :cdvBuildRelease
1>
1>  BUILD SUCCESSFUL
1>
1>  Total time: 6 mins 5.343 secs
1>  Command finished with error code 0: cmd /s /c ""C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\gradlew.bat" cdvBuildRelease -b "C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
1>  Built the following apk(s):
1>      C:/Users/poury/Documents/Visual Studio 2015/Projects/bazimTest/bazimTest/platforms/android/build/outputs/apk/android-release-unsigned.apk
1>  No scripts found for hook "after_build".
1>  No scripts found for hook "after_compile".
1>  ------ Copying back to project: Android
1>  ------ Copied platforms\android\build\outputs\apk\android-debug-unaligned.apk to C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bin\Android\Release\android-debug-unaligned.apk
1>  ------ Copied platforms\android\build\outputs\apk\android-debug.apk to C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bin\Android\Release\android-debug.apk
1>  ------ Copied platforms\android\build\outputs\apk\android-release-unsigned.apk to C:\Users\poury\Documents\Visual Studio 2015\Projects\bazimTest\bazimTest\bin\Android\Release\android-release-unsigned.apk
1>  ------ Done copying compiled files: Android
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

1 个答案:

答案 0 :(得分:3)

我遇到了这个问题,解决方案让我感到愚蠢 - 这是打开密钥密码提示时构建过程中的一个步骤。提示在另一台显示器上打开,我认为构建已冻结。提示符如下所示

enter password prompt