This is a migrated thread and some comments may be shown as answers.

Telerik Platform Android App Package build failing for barcodescanner plugin

4 Answers 72 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
peskyneil
Top achievements
Rank 1
peskyneil asked on 31 May 2016, 05:54 AM

Hello,

I'm receiving the following error message when doing an Android App Package build (in release mode).

Server exception
Project "TaskApplication.tmp.proj" (default targets): android Build Tooling revision 2016.05.03.3r Warning: Failed to install 'com.phonegap.plugins.barcodescanner':Error: Malformed comment Line: 31 Column: 6 Char: at error (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8) at strictFail (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/node_modules/sax/lib/sax.js:364:22) at Object.write (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/node_modules/sax/lib/sax.js:770:11) at XMLParser.feed (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/lib/parsers/sax.js:48:15) at ElementTree.parse (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/lib/elementtree.js:271:10) at Object.exports.XML (/home/builder/BpcTooling/Cordova3/node_modules/elementtree/lib/elementtree.js:606:13) at Object.module.exports.parseElementtreeSync (/home/builder/BpcTooling/Cordova3/node_modules/cordova-lib/cordova-lib/src/util/xml-helpers.js:123:38) at ConfigFile_load [as load] (/home/builder/BpcTooling/Cordova3/node_modules/cordova-lib/cordova-lib/src/plugman/util/ConfigFile.js:69:33) at new ConfigFile (/home/builder/BpcTooling/Cordova3/node_modules/cordova-lib/cordova-lib/src/plugman/util/ConfigFile.js:48:10) at ConfigKeeper_get [as get] (/home/builder/BpcTooling/Cordova3/node_modules/cordova-lib/cordova-lib/src/plugman/util/ConfigKeeper.js:51:23) Warning: Malformed comment Line: 31 Column: 6 Char: Warning: /home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189 throw Error("exit code: " + code); ^ Error: exit code: 1 at Error (native) at ChildProcess.<anonymous> (/home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189:14) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) Error: Build failed during execution Error: 'Build failed with error code 1' Done building project "TaskApplication.tmp.proj" -- FAILED. 

The project is builds fine for IOS and also works fine in the AppBuilder companion application on both IOS and Android.

I'm using the latest version of the barcodescanner plugin from the Telerik Verified Marketplace (version 5.0.0) with Cordova Version: 4.0.0 (Android 4.1.1, IOS 3.8.0, WP 3.8.0-2).

I've tried going back to an older version of Cordova, the barcodescanner plugin and have tried building for Android in both Debug and Release modes and am receiving the same error.

I've searched the knowledge base and can see references to similar issues with the advice to update the plugin to the latest version (see http://www.telerik.com/forums/breaking-change-introduces-build-failure-for-android) and have followed the link in there and followed those instructions. Since I was already on the latest version of the plugin however that had no effect. I've uninstalled the plugin and then re-installed it and get the same result.

So basically I'm now stuck and wondering if there was a known solution to this?

 

Regards,

 

4 Answers, 1 is accepted

Sort by
0
peskyneil
Top achievements
Rank 1
answered on 31 May 2016, 06:01 AM

Further to the above, I've just tried removing the barcodescanner plugin and then done a build with out it and then receive a similar exception for the crosswalk-webview plugin, this is also at the latest version (1.7.0).

If I then remove that plugin I get a similar exception for the cordova-plugin-battery-status, which is one of the core plugins. While I'm not using I have a feeling I could go on removing plugins and getting the same result for any plugin that's included in the application.

0
peskyneil
Top achievements
Rank 1
answered on 31 May 2016, 06:03 AM

Further to the above I've removed the barcodescanner plugin to see if I could get the project to build and its then complained with a similar error but for the Crosswalk plugin. When I remove that I then get a similar error for the battery plugin.

0
Garo
Telerik team
answered on 02 Jun 2016, 12:36 PM
Hello Neil,

This error message relates to malformed comment tag inside the Android Config.xml file. Inside AppBuilder right-click on your app, select Edit Configuration and then click on Android Config.xml. The problem should be located on row 31. Maybe the exclamation mark (!) from the comment tag is missing?

Regarding the CrossWalk plugin, there was an issue in the current version, which was addressed today. Updating the plugin to the latest version should fix all the issues that are experiencing. In the unlikely even that this does not work for you, I would like to suggest downgrading the CrossWalk plugin to version 1.5.1 and attempt to build your app again.

I hope this helps.

Regards,
Garo
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
peskyneil
Top achievements
Rank 1
answered on 06 Jun 2016, 01:25 AM

Hello Garo,

Thanks for the reply. Yep I discovered the config.xml issue after submitting the ticket and got that one sorted.

Also thanks for the CrossWalk information. That wasn't the issue at the time (CrossWalk plugin was sorted by the config.xml correction as well). However a day or two later we started getting build failures relating to CrossWalk again and the fix suggested by yourself resolved that.

Regards,

Tags
Report a bug
Asked by
peskyneil
Top achievements
Rank 1
Answers by
peskyneil
Top achievements
Rank 1
Garo
Telerik team
Share this question
or