2 Replies Latest reply on May 15, 2019 3:19 PM by 3571507

    Unable to generate apk file using MAF 2.5

    Gaurav.Anand

      Hi,

      I've migrated my existing mobile application from MAF version 2.3 to 2.5 and post-migration I'm unable to generate the deployable apk package.

      When I executed the deployment profile "MAF for Andriod" I could see that Gradle got installed and in the end, it failed due to an issue with Gradle task "app:mergeReleaseResources" .

       

      Config Details :

      JDev : 12.2.1.3.0

      API Level: 26

      MAF: 2.5

       

      Any ideas/pointer to resolve the below issue ? Do let me know if any further information is required from my end.

       

      Given below is the deployment log:

      [01:58:38 PM] Copying FARs to the MAF application...

      [01:58:38 PM] Extracting Feature Archive file, "ApplicationController_MobileFeatureArchive10.jar" to deployment folder, "ApplicationController".

      [01:58:38 PM] Extracting Feature Archive file, "ViewController_MobileFeatureArchive10.jar" to deployment folder, "ViewController".

      [01:58:38 PM] Copying .adf files...

      [01:58:38 PM] Copying adfmf-manifest.properties file...

      [01:58:38 PM] Copying application image files...

      [01:58:38 PM] Creating Android preferences XML files...

      [01:58:39 PM] Creating the Android template...

      [01:58:39 PM] Command-line executed:  "C:\Oracle\Jdev12.2.1.3_Middleware\Oracle_Home\oracle_common\jdk\bin\java" -jar "C:\Oracle\Jdev12.2.1.3_Middleware\Oracle_Home\jdeveloper\jdev\extensions\oracle.maf\maf-helper.jar" createTemplate -config "<Dir path removed intentionally>\deploy\Android_26_0_3\config.json" -platform android

      [01:58:51 PM] Installing "cordova-plugin-globalization" for android

      [01:59:02 PM] Installing "cordova-plugin-geolocation" for android

      [01:59:10 PM] Installing "cordova-plugin-compat" for android

      [01:59:18 PM] Installing "maf-cordova-plugin-push" for android

      [01:59:28 PM] Installing "maf-cordova-plugin-storage-access" for android

      [01:59:38 PM] Installing "com.unarin.cordova.beacon" for android

      [01:59:43 PM] Fetching plugin "cordova-plugin-device" via npm

      [01:59:48 PM] Installing "cordova-plugin-device" for android

      [01:59:50 PM] Copying security related files to the MAF application...

      [01:59:50 PM] Creating the Android application...

      [01:59:50 PM] Command-line executed from path: /<Dir path removed intentionally>/deploy/Android_26_0_3/android_template/

      [01:59:50 PM] Command-line executed:  "<Dir path removed intentionally>deploy\Android_26_0_3\android_template\gradlew.bat" assembleRelease -Pmaf_secure_props=maf_key_store_password,maf_key_password

      [02:00:00 PM] Compiling Cordova plugin gradle library 'com.android.support:support-v13:27.0.2'

      [02:00:05 PM] :app:makeAssetsZip

      [02:00:07 PM] :app:makeJvmlibsZip

      [02:00:07 PM] :app:preBuild

      [02:00:09 PM] :app:preReleaseBuild

      [02:00:09 PM] :app:compileReleaseAidl

      [02:00:09 PM] :app:compileReleaseRenderscript

      [02:00:09 PM] :app:checkReleaseManifest

      [02:00:09 PM] :app:generateReleaseBuildConfig

      [02:00:09 PM] :app:generateReleaseResValues

      [02:00:09 PM] :app:generateReleaseResources

      [02:00:14 PM] <Dir path removed intentionally>deploy\Android_26_0_3\android_template\app\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml: error: file not found.

      [02:00:14 PM]

      [02:00:15 PM] :app:mergeReleaseResources

      [02:00:15 PM] Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

      [02:00:15 PM] :app:mergeReleaseResources FAILED

      [02:00:15 PM]

      [02:00:15 PM] FAILURE: Build failed with an exception.

      [02:00:15 PM]

      [02:00:15 PM] * What went wrong:

      [02:00:15 PM] Execution failed for task ':app:mergeReleaseResources'.

      [02:00:15 PM] > Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

      [02:00:15 PM]

      [02:00:15 PM] * Try:

      [02:00:15 PM] 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.

      [02:00:15 PM]

      [02:00:15 PM] * Get more help at https://help.gradle.org

      [02:00:15 PM]

      [02:00:15 PM] BUILD FAILED in 19s

      [02:00:15 PM] 9 actionable tasks: 9 executed

      [02:00:15 PM] Deployment cancelled.

      [02:00:16 PM] ----  Deployment incomplete  ----.

      [02:00:16 PM] Failed to create the Android application.  Encountered exception: Command-line execution failed (Return code: 1). (oracle.adfmf.framework.dt.deploy.android.deployers.gradle.CreateApkFromTemplateDeployer)

      =============================================================================

       

      Thanks,

      Gaurav