Question

Mobile Build Failure

Hi All,

We are trying to rebuild the APK with our custom module with a new Hybrid Client container. It is failing with the below exception.

2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec]
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec]
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] FAILURE: Build failed with an exception.
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec]
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] * What went wrong:
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] Execution failed for task ':modules:Scanbot:processReleaseResources'.
2019-07-14 00:55:33,679 [rver Client Thread 1] [ STANDARD] [ ] [ ] (build.DefaultBuildServerClient) INFO - [customization] [exec] > com.android.ide.common.process.ProcessException: Failed to execute aapt

Things tried:

1. Recompile the custom module with the latest available HC client by following the below link. But without much success.

https://community.pega.com/knowledgebase/developing-custom-modules-android-pega-719#custom_modules_android_template

Any inputs will be of great help.

Regards,

Anand

***Edited by Moderator: Lochan to add SR tag***

Group Tags

Correct Answer
July 16, 2019 - 2:49pm

Hi Anand,

 

I have updated the SR as well with this information.

You have declared the dependencies for your custom module with a + like below

 

compile("com.google.android.gms:play-services-base:+") {
        force = true
    }
    compile("com.google.android.gms:play-services-gcm:+") {
        force = true
    }
    compile 'com.google.android.gms:play-services-location:+'

 

This forces the latest available version to be used. Android has released version 17.0.0 version in June which has some backward compatibility issues. So you should use the previous version of play services like below.

 

compile("com.google.android.gms:play-services-base:16.1.0") {
        force = true
    }

    compile("com.google.android.gms:play-services-gcm:16.1.0") {
        force = true
    }

    compile 'com.google.android.gms:play-services-location:16.0.0'

After above change I was able to do a local build successfully using HC 7.41.4.0.

More details in ticket

Thanks,

Rajesh.

Comments

Keep up to date on this post and subscribe to comments

Pega
July 15, 2019 - 3:08am

Hi,

What are the compileSdkVersion and buildToolsVersion set to in the moudle's build.gradle file?

If it's something other than 28 and 28.0.3, please try changing that and rebuilding with the latest HC.

July 15, 2019 - 11:42am
Response to gabir

Thanks for the response.

We were able to rebuild the same custom module couple of months back. There have been no changes to the custom module since then.

After I specify the  compileSdkVersion to 28 and buildToolsVersion to "28.0.3", it fails with the below error. Any insights will be of great help.

/Users/bs/mobilebuildserver/slaves/android/workspace/build-android/build/app/google-services.json
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] :app:generateDebugResources
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] :app:mergeDebugResources
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] :app:processDebugManifest
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] /Users/bs/mobilebuildserver/slaves/android/workspace/build-android/build/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:49: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec]     
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] /Users/bs/mobilebuildserver/slaves/android/workspace/build-android/build/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:49: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] FAILURE: Build failed with an exception.
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] * What went wrong:
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] Execution failed for task ':app:processDebugResources'.
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] > com.android.ide.common.process.ProcessException: Failed to execute aapt
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] * Try:
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] :app:processDebugResources FAILED
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] BUILD FAILED
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] 
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - [customization]      [exec] Total time: 55.9 secs
2019-07-15 10:51:08,311 [rver Client Thread 1] [  STANDARD] [                    ] [                    ] (build.DefaultBuildServerClient) INFO    - Exit code stored in /Users/bs/mobilebuildserver/slaves/android/workspace/build-android/build/out/exit_status.json

 

Regards,

Anand

Pega
July 16, 2019 - 2:49pm
Response to AnandrajT7685

Hi Anand,

 

I have updated the SR as well with this information.

You have declared the dependencies for your custom module with a + like below

 

compile("com.google.android.gms:play-services-base:+") {
        force = true
    }
    compile("com.google.android.gms:play-services-gcm:+") {
        force = true
    }
    compile 'com.google.android.gms:play-services-location:+'

 

This forces the latest available version to be used. Android has released version 17.0.0 version in June which has some backward compatibility issues. So you should use the previous version of play services like below.

 

compile("com.google.android.gms:play-services-base:16.1.0") {
        force = true
    }

    compile("com.google.android.gms:play-services-gcm:16.1.0") {
        force = true
    }

    compile 'com.google.android.gms:play-services-location:16.0.0'

After above change I was able to do a local build successfully using HC 7.41.4.0.

More details in ticket

Thanks,

Rajesh.