Generation Android debug App from template fails

Hi all

Could somebody help me with generation error. 

What I did:

  • Created new mobile application from "Employee App" template
  • Updated References and fixed one "API renaming bug"
  • Application works on WEB emulator

Where is problem:

  • Generating Android Debug App (without keystore data)
  • getting "An unexpected error has occurred while generating your application. Please try again. If the problem persists, contact OutSystems Support."

----> Can somebody help me how to solve it.

Where is log:

[2019-06-24T10:24:16.393Z] [INFO] Start processing job request...
[2019-06-24T10:24:16.395Z] [INFO] Start generating application...
[2019-06-24T10:24:16.395Z] [INFO] Template version: 5.1.1
[2019-06-24T10:24:16.396Z] [INFO] Build features: cordovaNoFetch - true
[2019-06-24T10:24:16.396Z] [INFO] Build features: buildTimeout - 20
[2019-06-24T10:24:16.396Z] [INFO] Creating a temporary folder for the application...
[2019-06-24T10:24:16.396Z] [INFO] Creating the required directory structure for your cordova application...
[2019-06-24T10:24:20.318Z] [INFO] Getting application resources...
[2019-06-24T10:24:20.340Z] [INFO] Processing application resources...
[2019-06-24T10:24:20.587Z] [INFO] Generating application assets...
[2019-06-24T10:24:20.978Z] [INFO] Applying configurations in the config.xml file...
[2019-06-24T10:24:20.987Z] [INFO] Applying advanced configurations in the config.xml file...
[2019-06-24T10:24:20.987Z] [INFO] Applying custom application icons...
[2019-06-24T10:24:20.987Z] [INFO] Applying custom application splashscreens...
[2019-06-24T10:24:20.988Z] [INFO] Applying application preferences...
[2019-06-24T10:24:20.988Z] [INFO] Applying application accessList...
[2019-06-24T10:24:20.988Z] [INFO] Adding target platform...
[2019-06-24T10:24:52.130Z] [INFO] Applying plugins in the config.xml file...
[2019-06-24T10:24:52.130Z] [INFO] Plugin Id: https://github.com/OutSystems/csZBar.git#v1.3.3.OS
[2019-06-24T10:24:52.130Z] [INFO] Plugin Action: add
[2019-06-24T10:24:55.602Z] [INFO] Plugin Id: https://github.com/OutSystems/cordova-plugin-fingerprint.git#1.0.1
[2019-06-24T10:24:55.602Z] [INFO] Plugin Action: add
[2019-06-24T10:25:00.633Z] [INFO] Plugin Id: https://github.com/OutSystems/cordova-plugin-secure-storage.git#v2.6.3
[2019-06-24T10:25:00.634Z] [INFO] Plugin Action: add
[2019-06-24T10:25:03.915Z] [INFO] Plugin Id: https://github.com/EddyVerbruggen/cordova-plugin-googleplus#5.0.3
[2019-06-24T10:25:03.915Z] [INFO] Plugin Action: add
[2019-06-24T10:25:08.306Z] [INFO] Getting signing keys...
[2019-06-24T10:25:08.410Z] [INFO] Building application package...
[2019-06-24T10:25:47.756Z] [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




> Task :help


Welcome to Gradle 4.10.3.


To run a build, run
gradle <task> ...



To see a list of available tasks, run gradle
tasks


To see a list of command-line options, run gradle
 --help


To see more detail about a task, run
gradle help --task <task>


For troubleshooting, visit
https://help.gradle.org


BUILD SUCCESSFUL
 in 10s

1 actionable task: 1 executed

Starting a Gradle Daemon, 14 stopped Daemons could not be reused, use --status for details


> Task :clean
 UP-TO-DATE
> Task :app:clean UP-TO-DATE


> Task :CordovaLib:clean UP-TO-DATE


> Task :app:cleanBuildCache

> Task :CordovaLib:cleanBuildCache



BUILD SUCCESSFUL
 in 8s

5 actionable tasks: 2 executed, 3 up-to-date


/tmp/build/source/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/opt/NativeBuilder/builds/f64ec8ec-211a-4cf3-807d-b4bc75bdb133/source/platforms/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
  is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
  Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

* 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 14s
Error: /opt/NativeBuilder/builds/f64ec8ec-211a-4cf3-807d-b4bc75bdb133/source/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: /opt/NativeBuilder/builds/f64ec8ec-211a-4cf3-807d-b4bc75bdb133/source/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/opt/NativeBuilder/builds/f64ec8ec-211a-4cf3-807d-b4bc75bdb133/source/platforms/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
  is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
  Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

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

[2019-06-24T10:25:47.756Z] [ERROR] Build failed with the following error: An unexpected error has occurred while generating your application. Please try again. If the problem persists, contact OutSystems Support.
[2019-06-24T10:25:47.757Z] [INFO] Remove debug/release signing properties
[2019-06-24T10:25:47.757Z] [INFO] Zipping application source...
[2019-06-24T10:26:13.243Z] [INFO] Application was not successfully generated!
[2019-06-24T10:26:13.245Z] [INFO] Execution time: 116891ms

How are you attempting to generate the APK? Are you using MABS?

What version of OutSystems platform are you running? What version of Service Studio?

Solution

Generation was started via Service Certer (and Service Studio also). Using MABS - latest.

I found the problem and solve it already.

Problem was in very old version of Google+ plugin and probably using old version of system components.

used "url": "https://github.com/EddyVerbruggen/cordova-plugin-googleplus#5.0.3",

now: "url": "https://github.com/EddyVerbruggen/cordova-plugin-googleplus#7.0.2",

Any way thank you for quick reply

Solution