':processDebugResources'。 > java.nio.charset.MalformedInputException:输入长度= 1'Gradle错误

时间:2018-09-05 12:55:16

标签: java android gradle

获取':processDebugResources'。 > java.nio.charset.MalformedInputException:输入长度= 1',而Gradle版本从2.14移到4.4后同步Gradle项目

下面是一些日志片段:

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':nuswype
dev:processDebugResources'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:100)

升级gradle后尝试同步项目时出现此问题,即在gradle插件版本和分发URL中进行更改:|

从控制台构建日志片段:

11:03:00.818 [INFO] [org.gradle.api.Project] AAPT warning(542041398), Job(QueuedJob{
title=Linking, 
task={config=AaptPackageConfig(manifestFile=C:\Code\Test\nuswypedev\build\intermediates\manifests\full\debug\AndroidManifest.xml, options=AaptOptions(noCompress=null, failOnMissingConfigEntry=false, additionalParameters=null), androidJarPath=C:\tools\android-sdk-windows\platforms\android-27\android.jar, variantType=DEFAULT, sourceOutputDir=C:\Code\Test\nuswypedev\build\generated\source\r\debug, resourceOutputApk=C:\Code\Test\nuswypedev\build\intermediates\res\debug\resources-debug.ap_, librarySymbolTableFiles=[C:\Code\Test\reslib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\d30f6a41a3493ed94e0db001717dee9d\339afdfa22f49f1269b39407a6f4c298\package-aware-r.txt, C:\Code\Test\corelib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\aa26708d27f3d5c7cf51cf24f8986b1b\1dc9d34cf009bfe0712a7075536cea9b\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\7f0f7479b516dcb23023411daa5520cd\c20a57f8dd37ce3db17e37afe01532f1\package-aware-r.txt], symbolOutputDir=C:\Code\Test\nuswypedev\build\intermediates\symbols\debug, verbose=false, resourceDirs=[C:\Code\Test\nuswypedev\build\intermediates\res\merged\debug], proguardOutputFile=null, mainDexListProguardOutputFile=C:\Code\Test\nuswypedev\build\intermediates\multi-dex\debug\manifest_keep.txt, splits=[], debuggable=true, customPackageForR=com.nuance.swype.input.ime, pseudoLocalize=false, preferredDensity=null, resourceConfigs=[], generateProtos=false, imports=[], packageId=null, dependentFeatures=[], listResourceFiles=false, staticLibrary=false, staticLibraryDependencies=[], intermediateDir=null)}, 
future=com.google.common.util.concurrent.SettableFuture@5bbe60ac}): C:\Code\Test\reslib\build\intermediates\packaged_res\debug\layout\checkbox_icon_preference.xml:3: warn: generated id 'android:id/widget_frame' for external package 'android'.
11:03:04.267 [INFO] [org.gradle.api.Project] AAPT1 err(Facade for 233221396): Done -> QueuedJob{
title=Linking, 
task={config=AaptPackageConfig(manifestFile=C:\Code\Test\nuswypedev\build\intermediates\manifests\full\debug\AndroidManifest.xml, options=AaptOptions(noCompress=null, failOnMissingConfigEntry=false, additionalParameters=null), androidJarPath=C:\tools\android-sdk-windows\platforms\android-27\android.jar, variantType=DEFAULT, sourceOutputDir=C:\Code\Test\nuswypedev\build\generated\source\r\debug, resourceOutputApk=C:\Code\Test\nuswypedev\build\intermediates\res\debug\resources-debug.ap_, librarySymbolTableFiles=[C:\Code\Test\reslib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\d30f6a41a3493ed94e0db001717dee9d\339afdfa22f49f1269b39407a6f4c298\package-aware-r.txt, C:\Code\Test\corelib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\aa26708d27f3d5c7cf51cf24f8986b1b\1dc9d34cf009bfe0712a7075536cea9b\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\9d14b253953a67224aed1a196311ae2f\0548ec7a53ea7ab370aed068852b161b\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\7f0f7479b516dcb23023411daa5520cd\c20a57f8dd37ce3db17e37afe01532f1\package-aware-r.txt], symbolOutputDir=C:\Code\Test\nuswypedev\build\intermediates\symbols\debug, verbose=false, resourceDirs=[C:\Code\Test\nuswypedev\build\intermediates\res\merged\debug], proguardOutputFile=null, mainDexListProguardOutputFile=C:\Code\Test\nuswypedev\build\intermediates\multi-dex\debug\manifest_keep.txt, splits=[], debuggable=true, customPackageForR=com.nuance.swype.input.ime, pseudoLocalize=false, preferredDensity=null, resourceConfigs=[], generateProtos=false, imports=[], packageId=null, dependentFeatures=[], listResourceFiles=false, staticLibrary=false, staticLibraryDependencies=[], intermediateDir=null)}, 
future=com.google.common.util.concurrent.SettableFuture@5bbe60ac}
11:03:04.267 [INFO] [org.gradle.api.Project] AAPT warning(542041398), Job(QueuedJob{
title=Linking, 
task={config=AaptPackageConfig(manifestFile=C:\Code\Test\nuswypedev\build\intermediates\manifests\full\debug\AndroidManifest.xml, options=AaptOptions(noCompress=null, failOnMissingConfigEntry=false, additionalParameters=null), androidJarPath=C:\tools\android-sdk-windows\platforms\android-27\android.jar, variantType=DEFAULT, sourceOutputDir=C:\Code\Test\nuswypedev\build\generated\source\r\debug, resourceOutputApk=C:\Code\Test\nuswypedev\build\intermediates\res\debug\resources-debug.ap_, librarySymbolTableFiles=[C:\Code\Test\reslib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\d30f6a41a3493ed94e0db001717dee9d\339afdfa22f49f1269b39407a6f4c298\package-aware-r.txt, C:\Code\Test\corelib\build\intermediates\res\symbol-table-with-package\debug\package-aware-r.txt,  C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\9d14b253953a67224aed1a196311ae2f\0548ec7a53ea7ab370aed068852b161b\package-aware-r.txt, C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\files-1.1\7f0f7479b516dcb23023411daa5520cd\c20a57f8dd37ce3db17e37afe01532f1\package-aware-r.txt], symbolOutputDir=C:\Code\Test\nuswypedev\build\intermediates\symbols\debug, verbose=false, resourceDirs=[C:\Code\Test\nuswypedev\build\intermediates\res\merged\debug], proguardOutputFile=null, mainDexListProguardOutputFile=C:\Code\Test\nuswypedev\build\intermediates\multi-dex\debug\manifest_keep.txt, splits=[], debuggable=true, customPackageForR=com.nuance.swype.input.ime, pseudoLocalize=false, preferredDensity=null, resourceConfigs=[], generateProtos=false, imports=[], packageId=null, dependentFeatures=[], listResourceFiles=false, staticLibrary=false, staticLibraryDependencies=[], intermediateDir=null)}, 
future=com.google.common.util.concurrent.SettableFuture@5bbe60ac}): Done
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_8): Death requested
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_7): Death requested
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_7): destruction
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_5): Death requested
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_5): destruction
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_8): destruction
11:03:04.308 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_6): Death requested
11:03:04.309 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_6): destruction
11:03:04.313 [INFO] [org.gradle.api.Project] Process (469795084) processed 0 files
11:03:04.313 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_8): Process(469795084), after shutdown queue_size=3
11:03:04.315 [INFO] [org.gradle.api.Project] Process (186846505) processed 0 files
11:03:04.315 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_7): Process(186846505), after shutdown queue_size=2
11:03:04.320 [INFO] [org.gradle.api.Project] Process (233221396) processed 1 files
11:03:04.320 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_5): Process(233221396), after shutdown queue_size=1
11:03:04.321 [INFO] [org.gradle.api.Project] Process (882946521) processed 0 files
11:03:04.322 [INFO] [org.gradle.api.Project] Thread(queued-resource-processor_6): Process(882946521), after shutdown queue_size=0
11:03:04.327 [INFO] [org.gradle.api.Project] Shutdown finished in 20ms
11:03:04.327 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Execute taskAction for :nuswypedev:processDebugResources'
11:03:04.328 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property incrementalFolder (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.330 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property mainDexListProguardOutputFile (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.335 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property resPackageOutputFolder (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.387 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property sourceOutputDir (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.398 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property symbolslWithPackageNameOutputFile (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.399 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] Snapshotting property textSymbolOutputFile (OUTPUT) for task ':nuswypedev:processDebugResources'
11:03:04.403 [DEBUG] [org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository] No discovered inputs for task ':nuswypedev:processDebugResources'
11:03:04.403 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
11:03:04.404 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':nuswypedev:processDebugResources'
11:03:04.404 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :nuswypedev:processDebugResources FAILED
11:03:04.404 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :nuswypedev:processDebugResources'
11:03:04.404 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :nuswypedev:processDebugResources' completed
11:03:04.404 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :nuswypedev:processDebugResources (Thread[Task worker for ':' Thread 3,5,main]) completed. Took 10.316 secs.
11:03:04.404 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.11 completed (1 worker(s) in use)
11:03:04.404 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 3: released lock on root.1.11
11:03:04.404 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 3: released lock on :
11:03:04.404 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 27.243 secs, idle: 3.069 secs
11:03:04.408 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
11:03:04.418 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 35 actionable tasks: 7 executed, 28 up-to-date
11:03:04.450 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
11:03:04.450 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker: released lock on root.1
11:03:04.450 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
11:03:04.464 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for task history cache (C:\Code\Test\.gradle\4.4\taskHistory)
11:03:04.464 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskHistory.bin (C:\Code\Test\.gradle\4.4\taskHistory\taskHistory.bin)
11:03:04.465 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (C:\Code\Test\.gradle\4.4\taskHistory).
11:03:04.468 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (C:\Code\Test\.gradle\buildOutputCleanup)
11:03:04.468 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFiles.bin (C:\Code\Test\.gradle\buildOutputCleanup\outputFiles.bin)
11:03:04.469 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (C:\Code\Test\.gradle\buildOutputCleanup).
11:03:04.472 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
11:03:04.473 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
11:03:04.478 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 6 resolution results binary files in 0.008 secs
11:03:04.629 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
11:03:04.629 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
11:03:04.630 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Artifact transforms cache (C:\Users\Shubham_Prakash\.gradle\caches\transforms-1)
11:03:04.630 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache results.bin (C:\Users\Shubham_Prakash\.gradle\caches\transforms-1\metadata-1.1\results.bin)
11:03:04.633 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Artifact transforms cache (C:\Users\Shubham_Prakash\.gradle\caches\transforms-1).
11:03:04.635 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (C:\Code\Test\.gradle\4.4\fileHashes)
11:03:04.635 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (C:\Code\Test\.gradle\4.4\fileHashes\fileHashes.bin)
11:03:04.635 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (C:\Code\Test\.gradle\4.4\fileHashes).
11:03:04.636 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Generated Gradle JARs cache (C:\Users\Shubham_Prakash\.gradle\caches\4.4\generated-gradle-jars) was closed 0 times.
11:03:04.643 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for artifact cache (C:\Users\Shubham_Prakash\.gradle\caches\modules-2)
11:03:04.643 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifact.bin (C:\Users\Shubham_Prakash\.gradle\caches\modules-2\metadata-2.36\module-artifact.bin)
11:03:04.647 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifacts.bin (C:\Users\Shubham_Prakash\.gradle\caches\modules-2\metadata-2.36\module-artifacts.bin)
11:03:04.652 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (C:\Users\Shubham_Prakash\.gradle\caches\modules-2\metadata-2.36\module-metadata.bin)
11:03:04.656 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-versions.bin (C:\Users\Shubham_Prakash\.gradle\caches\modules-2\metadata-2.36\module-versions.bin)
11:03:04.659 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\Users\Shubham_Prakash\.gradle\caches\modules-2).
11:03:04.660 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
11:03:04.741 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@225a4c38
11:03:04.741 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 18: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
11:03:04.743 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':nuswypedev:processDebugResources'.] from daemon DaemonInfo{pid=8948, address=[06f0ea6b-fc4b-4bcc-bfec-189dca7409df port:65210, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Busy, lastBusy=1536211939502, context=DefaultDaemonContext[uid=c2d60ef4-3c27-44ac-ac54-826265952316,javaHome=C:\Program Files\Java\jdk1.8.0_45,daemonRegistryDir=C:\Users\Shubham_Prakash\.gradle\daemon,pid=8948,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=1024m,-Xmx2048m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
11:03:04.743 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
11:03:04.745 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop

11:03:04.416 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:03:04.416 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:03:04.416 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:03:04.416 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] *What went wrong:
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task':nuswypedev:processDebugResources'.
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] >java.nio.charset.MalformedInputException: Input length = 1
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] *Try:
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
11:03:04.417 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:03:04.418 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] *Get more help at https://help.gradle.org
11:03:04.418 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
11:03:04.418 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 52s   

0 个答案:

没有答案