Build error for Android


#1

Code builds for Android on the computer where the application development started, but when code is pushed to gitlab, other developers pull, but can’t run code on their computers. This is the error =>

info: Running NativeScript application...
Searching for devices...
Copying template files...
Installing tns-android
+ tns-android@4.0.1
added 1 package in 13.219s
Project successfully created.
Preparing project...
Successfully prepared plugin @nstudio/nativescript-camera-plus for android.
Successfully prepared plugin nativescript-app-center for android.
Successfully prepared plugin nativescript-background-http for android.
Successfully prepared plugin nativescript-camera for android.
Successfully prepared plugin nativescript-cardview for android.
Successfully prepared plugin nativescript-chatview for android.
Successfully prepared plugin nativescript-checkbox for android.
Successfully prepared plugin nativescript-couchbase for android.
Successfully prepared plugin nativescript-directions for android.
Successfully prepared plugin nativescript-drop-down for android.
Successfully prepared plugin nativescript-exoplayer for android.
Successfully prepared plugin nativescript-fabric for android.
Successfully prepared plugin nativescript-fancyalert for android.
Successfully prepared plugin nativescript-floatingactionbutton for android.
Successfully prepared plugin nativescript-fonticon for android.
Successfully prepared plugin nativescript-geolocation for android.
Successfully prepared plugin nativescript-google-maps-sdk for android.
Successfully prepared plugin nativescript-localstorage for android.
Successfully prepared plugin nativescript-microsoft-appcenter for android.
Successfully prepared plugin nativescript-number-progressbar for android.
Successfully prepared plugin nativescript-permissions for android.
Successfully prepared plugin nativescript-slides for android.
Successfully prepared plugin nativescript-sqlite for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin nativescript-toast for android.
Successfully prepared plugin nativescript-ui-chart for android.
Successfully prepared plugin nativescript-videorecorder for android.
Successfully prepared plugin nativescript-vue for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin nativescript-appavailability for android.
Successfully prepared plugin nativescript-dom for android.
Successfully prepared plugin nativescript-ui-core for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Built aar for nativescript-google-maps-sdk
Project successfully prepared (Android)
Building project...
Gradle build...
	 + applying user-defined configuration from /Users/lanredev/Desktop/adm/dist/app/App_Resources/Android/app.gradle
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
	 + adding nativescript runtime package dependency: nativescript-optimized
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/@nstudio/nativescript-camera-plus/platforms/android/nativescript_camera_plus.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/@nstudio/nativescript-camera-plus/platforms/android/nativescript-camera-plus.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-background-http/platforms/android/nativescript_background_http.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-camera/platforms/android/nativescript_camera.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-geolocation/platforms/android/nativescript_geolocation.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-google-maps-sdk/platforms/android/nativescript_google_maps_sdk.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-microsoft-appcenter/platforms/android/nativescript_microsoft_appcenter.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-ui-chart/platforms/android/TNSChart-release.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/nativescript-ui-core/platforms/android/TNSCore-release.aar
	 + adding aar plugin dependency: /Users/lanredev/Desktop/adm/dist/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar

Unable to apply changes on device: xxxxxx. Error is: Command ./gradlew failed with exit code 1.

what could really be the problem guys… @manojdcoder


#2

Make sure you have proper environment setup with right versions as the source machine - CLI & Android SDK.


#3

okay, I’ll make sure they are exactly the same