Issue in building android application

Hi All,


I need a help, when it try to build my application through service studio using native platforms,

I get the following error in case of Android.


Error : In Android on 2019-11-21 at 17:01:53 - Error generating application. This happened because script 'platforms/android/app/cordova-android-support-gradle-release/properties.gradle' was not found. Please check your script path and try again.


Please anyone...


Thanks,

DM

Hi, Dhiraj

Try providing us with more info, like the BuildLog.

It is likely, however, that this was caused by outdated references.

Sam

Hi, Dhiraj.

Maybe that will help.Outystems | Android | Generate build issue


Samuel Neves wrote:

Hi, Dhiraj

Try providing us with more info, like the BuildLog.

It is likely, however, that this was caused by outdated references.

Sam

Hi Samuel,

Following is the log.


[2019-11-21T12:27:55.785Z] [INFO] Start processing job request...
[2019-11-21T12:27:55.788Z] [INFO] Start generating application...
[2019-11-21T12:27:55.788Z] [INFO] Template version: 5.1.13
[2019-11-21T12:27:55.788Z] [INFO] Build features: cordovaNoFetch - true
[2019-11-21T12:27:55.789Z] [INFO] Build features: buildTimeout - 20
[2019-11-21T12:27:55.789Z] [INFO] Creating a temporary folder for the application...
[2019-11-21T12:27:55.789Z] [INFO] Creating the required directory structure for your cordova application...
[2019-11-21T12:27:59.714Z] [INFO] Getting application resources...
[2019-11-21T12:27:59.723Z] [INFO] Processing application resources...
[2019-11-21T12:27:59.942Z] [INFO] Generating application assets...
[2019-11-21T12:28:00.270Z] [INFO] Applying configurations in the config.xml file...
[2019-11-21T12:28:00.279Z] [INFO] Applying advanced configurations in the config.xml file...
[2019-11-21T12:28:00.280Z] [INFO] Applying custom application icons...
[2019-11-21T12:28:00.280Z] [INFO] Applying custom application splashscreens...
[2019-11-21T12:28:00.280Z] [INFO] Applying application preferences...
[2019-11-21T12:28:00.285Z] [INFO] Writing your cordova preferences...
[2019-11-21T12:28:00.285Z] [INFO] Applying application accessList...
[2019-11-21T12:28:00.286Z] [INFO] Adding target platform...
[2019-11-21T12:28:36.364Z] [INFO] Applying plugins in the config.xml file...
[2019-11-21T12:28:36.365Z] [INFO] Plugin Id: https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.3.2-OS2
[2019-11-21T12:28:36.365Z] [INFO] Plugin Action: add
[2019-11-21T12:28:40.242Z] [INFO] Plugin Id: https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.0.12.OS
[2019-11-21T12:28:40.242Z] [INFO] Plugin Action: add
[2019-11-21T12:28:45.409Z] [INFO] Getting signing keys...
[2019-11-21T12:28:45.524Z] [INFO] Building application package...
[2019-11-21T12:28:53.766Z] [ERROR] Stopping Daemon(s)


2 Daemons stopped


To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html.


Daemon will be stopped at the end of the build stopping after processing



> Configure project :app


Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.


FAILURE: Build failed with an exception.

* Where:

/tmp/build/source/platforms/android/cordova-android-support-gradle-release/DAFConnect-cordova-android-support-gradle-release.gradle' line: 11


* What went wrong:

A problem occurred evaluating script.
>
Could not read script '/opt/NativeBuilder/builds/208a2b63-ffe9-42c5-8690-afed46940691/source/platforms/android/app/cordova-android-support-gradle-release/properties.gradle' as it does not exist.

* 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 5s

Error: Unable to disable Gradle daemon

[2019-11-21T12:28:53.766Z] [ERROR] Build failed with the following error: Error generating application. This happened because script 'platforms/android/app/cordova-android-support-gradle-release/properties.gradle' was not found. Please check your script path and try again.
[2019-11-21T12:28:53.766Z] [INFO] Remove debug/release signing properties
[2019-11-21T12:28:53.766Z] [INFO] Zipping application source...
[2019-11-21T12:29:15.570Z] [INFO] Application was not successfully generated!
[2019-11-21T12:29:15.570Z] [INFO] Execution time: 79822ms


Hi, Dhiraj

I think you're compiling the same plugin twice in different versions with your app. Choose one of them:

https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.3.2-OS2
or
https://github.com/OutSystems/OneSignal-Cordova-SDK.git#2.0.12.OS

And try to regenerate the app again after correcting dependencies.

Let me know if it works,

Sam