nativescript-community / nativescript-drawingpad

:pencil: NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Apache License 2.0
90 stars 32 forks source link

Windows 10 gradle build failing but working on mac #46

Closed Jonatthu closed 5 years ago

Jonatthu commented 5 years ago

The angular code is passing good with no issues, the problem starts when gradle tries to build the project with this specific plugin.

I already try npm install again, tns platform remove android and re-adding again

This is the following error message that I am getting on windows only:

Executing before-shouldPrepare hook from C:\GoGoApps\GoGoSharedModules\hooks\before-shouldPrepare\nativescript-dev-webpack.js
Skipping prepare.
Building project...
Gradle build...
         + setting applicationId
         + applying user-defined configuration from C:\GoGoApps\GoGoSharedModules\App_Resources\Android\app.gradle
         Applying settings from C:\GoGoApps\GoGoSharedModules\App_Resources\Android\settings.json
Using support library version 28.0.0
         + adding nativescript runtime package dependency: nativescript-optimized-with-inspector
         + adding aar plugin dependency: C:\GoGoApps\GoGoSharedModules\node_modules\nativescript-ng-shadow\platforms\android\nativescript_ng_shadow.aar
         + adding aar plugin dependency: C:\GoGoApps\GoGoSharedModules\node_modules\nativescript-ui-sidedrawer\platforms\android\TNSSideDrawer-release.aar
         + adding aar plugin dependency: C:\GoGoApps\GoGoSharedModules\node_modules\nativescript-ui-core\platforms\android\TNSCore-release.aar
         + adding aar plugin dependency: C:\GoGoApps\GoGoSharedModules\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.android.databinding:baseLibrary:2.2.3.
  Searched in the following locations:
    - file:/C:/Android/android-sdk/extras/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/Android/android-sdk/extras/google/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/google/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/Android/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/platforms/android/app/libs/runtime-libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/platforms/android/app/libs/runtime-libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/App_Resources/Android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/App_Resources/Android/libs/baseLibrary.jar
  Required by:
      project :app > com.github.gcacace:signature-pad:1.2.1
> Could not find com.android.databinding:baseLibrary:2.2.3.
  Searched in the following locations:
    - file:/C:/Android/android-sdk/extras/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/Android/android-sdk/extras/google/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/google/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/Android/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - file:/C:/Android/android-sdk/extras/android/m2repository/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
    - https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-angular/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-drawingpad/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ng-shadow/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ngx-fonticon/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-sqlite/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-theme-core/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-sidedrawer/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-intl/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/nativescript-ui-core/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/node_modules/tns-core-modules-widgets/platforms/android/libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/platforms/android/app/libs/runtime-libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/platforms/android/app/libs/runtime-libs/baseLibrary.jar
    - file:/C:/GoGoApps/GoGoSharedModules/App_Resources/Android/libs/baseLibrary-2.2.3.jar
    - file:/C:/GoGoApps/GoGoSharedModules/App_Resources/Android/libs/baseLibrary.jar
  Required by:
      project :app > com.github.gcacace:signature-pad:1.2.1 > com.android.databinding:library:1.2.1
      project :app > com.github.gcacace:signature-pad:1.2.1 > com.android.databinding:adapters:1.2.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Command gradlew.bat failed with exit code 1
bradmartin commented 5 years ago

I'd first make sure you have the latest android SDK and build-tools installed. Let me know if that helps with the build issue.

Jonatthu commented 5 years ago

Executing tns --log trace and yes I am on the latest

PS C:\GoGoApps\GoGoSharedModules> tns --log trace
Loading extensions.
Asserting extension nativescript-cloud is installed.
Extension nativescript-cloud is installed.
System information:
{ platform: 'win32',
  shell: 'C:\\Windows\\system32\\cmd.exe',
  os: 'Windows 10 Pro N for Workstations 6.3.17134',
  procArch: 'x64',
  nodeVer: '10.13.0',
  npmVer: '6.4.1',
  nodeGypVer: null,
  nativeScriptCliVersion: '5.0.1',
  gitVer: '2.19.1.windows.1',
  dotNetVer: '4.7.03056',
  javacVersion: '1.8.0_191',
  adbVer: '1.0.40',
  androidInstalled: true,
  monoVer: null,
  gradleVer: null,
  isAndroidSdkConfiguredCorrectly: true,
  xcodeVer: undefined,
  xcodeprojLocation: null,
  itunesInstalled: false,
  cocoaPodsVer: undefined,
 isCocoaPodsWorkingCorrectly: false,
  isCocoaPodsUpdateRequired: false,
  pythonInfo: null }
Starting watch on killswitch C:\Users\EUGENE~1.PAR\AppData\Local\Temp\Eugene.Park\KillSwitches\cli
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
Looking for project in 'C:\GoGoApps\GoGoSharedModules'
Project directory is 'C:\GoGoApps\GoGoSharedModules'.
List of registered commands: /?, accept, accept|eula, account, account|features, account|usage, appstore, appstore|upload, autocomplete, autocomplete|disable, autocomplete|enable, autocomplete|status, build, build|android, build|cloud, build|ios, clean-app, clean-app|android, clean-app|ios, cloud, cloud|build, cloud|clean|workspace, cloud|codesign, cloud|deploy, cloud|lib|version, cloud|publish|android, cloud|publish|ios, cloud|run|*all, cloud|run|android, cloud|run|ios, cloud|setup, codesign, codesign|cloud, config, config|apply, config|reset, config|set, create, debug, debug|android, debug|ios, deploy, deploy|cloud, dev-generate-help,
dev-generate-messages, dev-login, dev-post-install, dev-preuninstall, dev-test, dev-test|android, dev-test|ios, device, devices, devices|android, devices|ios, device|android, device|get-file, device|ios, device|list-applications, device|list-files, device|log, device|put-file, device|run, device|stop, device|uninstall, doctor, error-reporting, extension, extension|install, extension|uninstall, generate, help, info, init, install, kill-server, login, logout, platform, platform|add, platform|clean, platform|remove, platform|update, plugin, plugin|add, plugin|build, plugin|create, plugin|install, plugin|remove, plugin|update, policy, policy|accept, post-install-cli, prepare, preview, proxy, proxy|clear, proxy|set, publish, publish|ios, resources, resources|generate|icons, resources|generate|splashes, resources|update, run, run|android, run|cloud|*all, run|cloud|android, run|cloud|ios, run|ios, setup, setup|cloud, test, test|android, test|init, test|ios, update, usage-reporting, user
Reading help for command ''. FileName is 'index.md'.
Jonatthu commented 5 years ago

@bradmartin I found that the build.gradle file is the problem, on platforms/android/build.gradle removing the dependency signature-pad allows to build but obviously this does not download the plugin and then is a running time problem

reading the doc of the plugin it says that we should add on repositories a mavenCentral()

which is missing on the source code of this plugin

Jonatthu commented 5 years ago

Still after following the documentation is failing looks like is having problems finding com.android.databinding:baseLibrary:2.2.3

bradmartin commented 5 years ago

Updated the plugin gradle with 3.0.4 but still not sure why PC would fail with this plugin. Seems odd, can confirm building on Mac is working fine.

Jonatthu commented 5 years ago

I can confirm my build now is working on windows 10, I will double check running time and Mac OS as well