Cordova build issues in 8.4 Visualizer

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

#[Informational Post]​

Error statement 1:

C:\\Users\\<<id>>\\KonyVizEWS8.4\\<<YourProject>>\\cordovatemp\\platforms\\android\\build\\intermediates\\manifests\\full\\debug\\AndroidManifest.xml:25:

error: No resource identifier found for attribute \'appComponentFactory\' in package \'android\'

1.<<Workspace>>\<<YourProect>>\web\cordova\plugins

In the above path under all SDK's plugin.xml files, few changes are requried:

Modify

<framework src="com.google.android.gms:play-services-analytics:+" /> to

<framework src="com.google.android.gms:play-services-analytics:16.0.4" />

2. <<Workspace>>\<<YourProect>>\web\cordova\platforms\android

In the above path open the build.gradle file and make the few changes mentioned below:

i. modify

compileSdkVersion cdvCompileSdkVersion

to

compileSdkVersion 28

ii. In dependencies {

}

Modify compile to implementation

ex:

dependencies {

implementation "com.google.android.gms:play-services-analytics:16.0.4"

}

iii. Modify

task cdvPrintProps << {

}

To

task cdvPrintProps {

}

iv. Comment the below line

//implementation fileTree(dir: 'libs', include: '*.jar')

3. Move the jars in below path :

<<Workspace>>\<<YourProect>>\web\cordova\platforms\android\libs

To

<<Workspace>>\<<YourProect>>\resources\customlibs\lib\android

If they are duplicate remove them.

4. Now add the attached Androidridprecompiletask.xml file in the following path

<<Workspace>>\<<YourProect>>\

If in case of you are already having the same file then add the following lines in your Androidridprecompiletask.xml

<replace file="${app.dir}/gradle/wrapper/gradle-wrapper.properties" token="gradle-4.6-all.zip" value="gradle-5.1.1-all.zip" />

<replace file="${app.dir}/CordovaAssetsLib/gradle/wrapper/gradle-wrapper.properties" token="gradle-4.6-all.zip" value="gradle-5.1.1-all.zip" />

<replace file="${app.dir}/build.gradle" token="3.2.1" value="3.4.1" />

<replace file="${app.dir}/CordovaAssetsLib/build.gradle" token="2.2.3" value="3.4.1"/>

Here gradile versions 4.6, 3.2.1 and 2.2.3 need to be changed according to your application versions.

Error statement 2:

<<id>>\\KonyVizEWS8.4\\<<YourProject>>\\cordovatemp\\platforms\\android\\build\\intermediates\\manifests\\full\\debug\\AndroidManifest.xml:25: error: Error: No resource found that matches the given name (at \'icon\' with value \'@mipmap/ic_launcher\').

<<Workspace>>\<<YourProect>>\web\cordova\platforms\android\res\mipmap-hdpi

In the above path add ic_launcher.png file

Please find the Androidridprecompiletask.xml file here.

androidprecompiletask.zip

Thank you so much for sharing this helpful information! 😀