NativeScript / sample-ImageUpload

An integration of nativescript-image-picker and nativescript-background-http
Apache License 2.0
22 stars 19 forks source link

FAILURE: Build failed with an exception. #18

Closed DavidHLau closed 6 years ago

DavidHLau commented 6 years ago

[18-02-11 11:31:01.229] (Info) Build started. [18-02-11 11:31:52.204] (Info) Downloading https://services.gradle.org/distributions/gradle-3.3-bin.zip [18-02-11 11:32:05.472] (Info) Unzipping C:\Users.gradle\wrapper\dists\gradle-3.3-bin\64bhckfm0iuu9gap9hg3r7ev2\gradle-3.3-bin.zip to C:\Users.gradle\wrapper\dists\gradle-3.3-bin\64bhckfm0iuu9gap9hg3r7ev2 [18-02-11 11:32:38.882] (Info) + applying user-defined configuration from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\app\App_Resources\Android\app.gradle [18-02-11 11:32:41.513] (Info) Applying settings from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\app\App_Resources\Android\settings.json [18-02-11 11:32:42.040] (Info) + add include.gradle from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-background-http\platforms\android\include.gradle [18-02-11 11:32:42.112] (Info) + add include.gradle from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-imagepicker\platforms\android\include.gradle [18-02-11 11:32:42.167] (Info) + add include.gradle from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\include.gradle [18-02-11 11:32:42.187] (Info) + creating include.gradle for plugin C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\tns-core-modules-widgets [18-02-11 11:32:42.198] (Info) + applying plugin configuration from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\configurations\nativescript-background-http\include.gradle [18-02-11 11:32:42.330] (Info) + applying plugin configuration from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\configurations\nativescript-imagepicker\include.gradle [18-02-11 11:32:42.590] (Info) + applying plugin configuration from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\configurations\nativescript-pro-ui\include.gradle [18-02-11 11:32:42.882] (Info) + applying plugin configuration from C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\configurations\tns-core-modules-widgets\include.gradle [18-02-11 11:32:43.442] (Info) + adding nativescript runtime package dependency: nativescript-optimized [18-02-11 11:32:43.543] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Chart-2017.1.1030-dev-release.aar [18-02-11 11:32:43.545] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Common-2017.1.1030-dev-release.aar [18-02-11 11:32:43.547] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Data-2017.1.1030-dev-release.aar [18-02-11 11:32:43.550] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Feedback-2017.1.1030-dev-release.aar [18-02-11 11:32:43.554] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Gauges-2017.1.1030-dev-release.aar [18-02-11 11:32:43.559] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Input-2017.1.1030-dev-release.aar [18-02-11 11:32:43.562] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\List-2017.1.1030-dev-release.aar [18-02-11 11:32:43.564] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\nativescript-pro-ui\platforms\android\Primitives-2017.1.1030-dev-release.aar [18-02-11 11:32:43.574] (Info) + adding aar plugin dependency: C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar [18-02-11 11:33:10.661] (Info) Running full build [18-02-11 11:33:20.543] (Info) Error: Failed to crunch file C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\intermediates\exploded-aar\com.android.support\appcompat-v7\26.0.0-alpha1\res\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png into C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\intermediates\res\merged\F0F1F2F3\debug\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png [18-02-11 11:33:20.556] (Info) FAILURE: Build failed with an exception. [18-02-11 11:33:20.558] (Info) What went wrong: [18-02-11 11:33:20.560] (Info) Execution failed for task ':mergeF0F1F2F3DebugResources'. [18-02-11 11:33:20.562] (Info) > Error: Failed to crunch file C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\intermediates\exploded-aar\com.android.support\appcompat-v7\26.0.0-alpha1\res\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png into C:\Users\Desktop\sample-ImageUpload-master\sample-ImageUpload-master\platforms\android\build\intermediates\res\merged\F0F1F2F3\debug\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png [18-02-11 11:33:20.565] (Info) Try: [18-02-11 11:33:20.569] (Info) Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. [18-02-11 11:33:21.276] (Error) Command gradlew.bat failed with exit code 1 Error output:

FAILURE: Build failed with an exception.

tsonevn commented 6 years ago

HI @DavidHLau, We reviewed the error and found that the issue could be related to the fact that you have reached the max file path line of the operating system.

To solve the issue, you could move the project to some folder in "C:\". More about the topic could be found in this StackOverflow thread.

DavidHLau commented 6 years ago

Hi,

I resolved the issue by creating a "new app" project in the same root directory as the "failed" build without having to move the project to "C:".

Copy the source files .js, .xml into the new app and build without errors...not sure why this worked and the other project "failed".

The only exception was plugin "backgroud-http", I opened another issue re "Error calling module function: background-http #109"