19 Replies Latest reply on Dec 24, 2016 4:05 AM by franko87419730

    android build failed

    franko87419730 Level 1

      when building my project in pgb windows builds succesfully but error with android.....virus scan failed. pls somebody help me out

        • 1. Re: android build failed
          franko87419730 Level 1

          <?xml version="1.0" encoding="utf-8"?>

          <widget xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps"

          id="io.cordova.myapp591547" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" defaultlocale="en-US" android-versionCode="1">


            <description>A blank project that uses Apache Cordova to help you build an app that targets multiple mobile platforms: Android, iOS, Windows, and Windows Phone.</description>

            <author href="http://cordova.io" email="dev@cordova.apache.org">Qface Group Ghana</author>

            <content src="index.html" />

            <access origin="*" />

            <vs:features />

            <preference name="SplashScreen" value="screen" />

            <preference name="windows-target-version" value="8.1" />

            <!-- Support for Cordova 5.0.0 plugin system -->

            <plugin name="cordova-plugin-whitelist" version="1" />

            <allow-intent href="http://*/*" />

            <allow-intent href="https://*/*" />

            <allow-intent href="tel:*" />

            <allow-intent href="sms:*" />

            <allow-intent href="mailto:*" />

            <allow-intent href="geo:*" />

            <platform name="android">

              <allow-intent href="market:*" />


            <platform name="ios">

              <allow-intent href="itms:*" />

              <allow-intent href="itms-apps:*" />


            <platform name="android">

              <icon src="ghslogo.jpg" />

              <icon src="res/icons/android/icon-36-ldpi.png" density="ldpi" />

              <icon src="res/icons/android/icon-48-mdpi.png" density="mdpi" />

              <icon src="res/icons/android/icon-72-hdpi.png" density="hdpi" />

              <icon src="res/icons/android/icon-96-xhdpi.png" density="xhdpi" />


            <platform name="ios">

              <!-- iOS 8.0+ -->

              <!-- iPhone 6 Plus  -->

              <icon src="res/icons/ios/icon-60-3x.png" width="180" height="180" />

              <!-- iOS 7.0+ -->

              <!-- iPhone / iPod Touch  -->

              <icon src="res/icons/ios/icon-60.png" width="60" height="60" />

              <icon src="res/icons/ios/icon-60-2x.png" width="120" height="120" />

              <!-- iPad -->

              <icon src="res/icons/ios/icon-76.png" width="76" height="76" />

              <icon src="res/icons/ios/icon-76-2x.png" width="152" height="152" />

              <!-- iOS 6.1 -->

              <!-- Spotlight Icon -->

              <icon src="res/icons/ios/icon-40.png" width="40" height="40" />

              <icon src="res/icons/ios/icon-40-2x.png" width="80" height="80" />

              <!-- iPhone / iPod Touch -->

              <icon src="res/icons/ios/icon-57.png" width="57" height="57" />

              <icon src="res/icons/ios/icon-57-2x.png" width="114" height="114" />

              <!-- iPad -->

              <icon src="res/icons/ios/icon-72.png" width="72" height="72" />

              <icon src="res/icons/ios/icon-72-2x.png" width="144" height="144" />

              <!-- iPhone Spotlight and Settings Icon -->

              <icon src="res/icons/ios/icon-small.png" width="29" height="29" />

              <icon src="res/icons/ios/icon-small-2x.png" width="58" height="58" />

              <!-- iPad Spotlight and Settings Icon -->

              <icon src="res/icons/ios/icon-50.png" width="50" height="50" />

              <icon src="res/icons/ios/icon-50-2x.png" width="100" height="100" />


            <platform name="windows">

              <icon src="res/icons/windows/Square150x150Logo.scale-100.png" width="150" height="150" />

              <icon src="res/icons/windows/Square150x150Logo.scale-240.png" width="360" height="360" />

              <icon src="res/icons/windows/Square30x30Logo.scale-100.png" width="30" height="30" />

              <icon src="res/icons/windows/Square310x310Logo.scale-100.png" width="310" height="310" />

              <icon src="res/icons/windows/Square44x44Logo.scale-240.png" width="106" height="106" />

              <icon src="res/icons/windows/Square70x70Logo.scale-100.png" width="70" height="70" />

              <icon src="res/icons/windows/Square71x71Logo.scale-240.png" width="170" height="170" />

              <icon src="res/icons/windows/StoreLogo.scale-100.png" width="50" height="50" />

              <icon src="res/icons/windows/StoreLogo.scale-240.png" width="120" height="120" />

              <icon src="res/icons/windows/Wide310x150Logo.scale-100.png" width="310" height="150" />

              <icon src="res/icons/windows/Wide310x150Logo.scale-240.png" width="744" height="360" />


            <platform name="wp8">

              <icon src="res/icons/wp8/ApplicationIcon.png" width="62" height="62" />

              <icon src="res/icons/wp8/Background.png" width="173" height="173" />


            <platform name="android">


              <splash src="res/screens/android/screen-hdpi-landscape.png" density="land-hdpi" /><splash src="res/screens/android/screen-ldpi-landscape.png" density="land-ldpi" /><splash src="res/screens/android/screen-mdpi-landscape.png" density="land-mdpi" /><splash src="res/screens/android/screen-xhdpi-landscape.png" density="land-xhdpi" /><splash src="res/screens/android/screen-hdpi-portrait.png" density="port-hdpi" /><splash src="res/screens/android/screen-ldpi-portrait.png" density="port-ldpi" /><splash src="res/screens/android/screen-mdpi-portrait.png" density="port-mdpi" /><splash src="res/screens/android/screen-xhdpi-portrait.png" density="port-xhdpi" /></platform>

            <platform name="ios">

              <splash src="res/screens/ios/screen-iphone-portrait.png" width="320" height="480" />

              <splash src="res/screens/ios/screen-iphone-portrait-2x.png" width="640" height="960" />

              <splash src="res/screens/ios/screen-ipad-portrait.png" width="768" height="1024" />

              <splash src="res/screens/ios/screen-ipad-portrait-2x.png" width="1536" height="2048" />

              <splash src="res/screens/ios/screen-ipad-landscape.png" width="1024" height="768" />

              <splash src="res/screens/ios/screen-ipad-landscape-2x.png" width="2048" height="1536" />

              <splash src="res/screens/ios/screen-iphone-568h-2x.png" width="640" height="1136" />

              <splash src="res/screens/ios/screen-iphone-portrait-667h.png" width="750" height="1334" />

              <splash src="res/screens/ios/screen-iphone-portrait-736h.png" width="1242" height="2208" />

              <splash src="res/screens/ios/screen-iphone-landscape-736h.png" width="2208" height="1242" />


            <platform name="windows">

              <splash src="res/screens/windows/SplashScreen.scale-100.png" width="620" height="300" />

              <splash src="res/screens/windows/SplashScreen.scale-240.png" width="1152" height="1920" />

              <splash src="res/screens/windows/SplashScreenPhone.scale-240.png" width="1152" height="1920" />


            <platform name="wp8">

              <splash src="res/screens/wp8/SplashScreenImage.jpg" width="480" height="800" />


            <preference name="android-minSdkVersion" value="1" />

            <preference name="android-maxSdkVersion" value="6" />

            <plugin name="cordova-plugin-dialogs" version="1.3.0" />

            <plugin name="cordova-plugin-contacts" version="2.2.0" />

            <plugin name="cordova-plugin-vibration" version="2.1.2" />

            <plugin name="cordova-plugin-compat" version="1.1.0" />


          • 2. Re: android build failed
            franko87419730 Level 1

            build error.PNGplease that is the error and my config file is what i have uploaded pls i really need help

            • 3. Re: android build failed
              kerrishotts Adobe Employee

              What's your App ID so that staff can help?


              Also, what does your zip file look like? Are you absolutely sure there isn't anything that might trigger an AV warning? Try scanning your zip file with your own anti-virus and see if that throws a flag or not.

              • 4. Re: android build failed
                franko87419730 Level 1

                this is my app id ......2232956

                • 5. Re: android build failed
                  franko87419730 Level 1

                  all my apps which were built succesfully and clients are using can no more build successfully again. the windows is succesful but only the android triggers that error

                  • 6. Re: android build failed
                    VectorP Level 4

                    Here's some feedback on your config:


                    1. Remove <vs:features />


                    2. Remove the version attribute from <plugin name="cordova-plugin-whitelist" version="1" />

                    since that version doesn't exist. Don't use the version attribute, in order to get the latest version.


                    3. According to the PGB docs, your default icon should be called #icon.png' and should be a png file,

                    not <icon src="ghslogo.jpg" />


                    4. For both Android and iOS, you are missing several icons/splash sizes


                    5. This makes your config 'not well-formed', so it is invalid and can't be used at all:

                      <platform name="android">



                    6. You are using compound qualifiers in the density attribute, as in

                    <splash src="res/screens/android/screen-hdpi-landscape.png" density="land-hdpi" />

                    You can't do that. Use the 'qualifier' attribute instead.


                    7. The SDK versions are totally wrong:

                      <preference name="android-minSdkVersion" value="1" />

                      <preference name="android-maxSdkVersion" value="6" />

                    Use relevant values, or refrain from specifying SDK versions.

                    • 7. Re: android build failed
                      franko87419730 Level 1

                      pls i have made all the neccessary corrections and have scaned my zip file with an antivirus but still error

                      pls any one with solution to this virus scan error should help me

                      • 8. Re: android build failed
                        VectorP Level 4


                        Is your zip file available online somewhere? Please post its url.

                        • 10. Re: android build failed
                          franko87419730 Level 1

                          please that is my zip file kindly help me out

                          • 11. Re: android build failed
                            VectorP Level 4

                            I had a look at your zip file.

                            Your config still contains errors as indicated by me above, under (1) through (6).

                            You should correct these, first.


                            • 12. Re: android build failed
                              franko87419730 Level 1

                              www.zip - Google Drive

                              please this is the update link with the corrections made. but for the splash screen, it was generated by the visual studio and am sure that isnt the problem because it was working earlier.

                              • 13. Re: android build failed
                                VectorP Level 4

                                Are the splashs screens the problem??


                                a. You specify path "res/screens/..." and "res/icons/...", but these directories are not included in your zip file.

                                b. Your config doesn't include the splashscreen plugin (and you should include the statusbar plugin as well).

                                c. ...and you still failed to make the corrections. For instance, you're still using the density attribute for compound android splash qualifiers. :-(

                                • 14. Re: android build failed
                                  franko87419730 Level 1

                                  i think adobe have to re-define their virus scan.......because the same code were building successfully why not now!

                                  • 15. Re: android build failed
                                    franko87419730 Level 1

                                    please is adobe phone build the only platform I can build cordova application?

                                    • 16. Re: android build failed
                                      kerrishotts Adobe Employee

                                      You can always build your apps locally, but this requires installing the Android SDK and other prerequisites.


                                      I would remove everything but index.html and config.xml, and try to build with that. If that works, start adding files back to the PGB upload until the build process complains. That would at least pinpoint which file is triggering the warning (assuming you can build with only your index.html file)

                                      • 17. Re: android build failed
                                        franko87419730 Level 1

                                        wooooow! thank you very much it worked like magic. it was only one file icons-svg causing that problem. my app now builds correctly


                                        • 18. Re: android build failed
                                          franko87419730 Level 1

                                          pls i want to add a local notification functionality to my app. am using visual studio cordova applicationCapture.PNG

                                          • 19. Re: android build failed
                                            franko87419730 Level 1

                                            that is my interface of the add notifification. i have my local notification plugin ready in my app but

                                            //// this is the addpage.html codes




                                                <div data-role="page" data-position="fixed">

                                                    <header data-role="header" style="background-color:red">

                                                        <a href="#" data-icon="back" data-iconpos="notext" data-rel="back" title="Go back">Back</a>

                                                        <h1><BLINK><font color="#FFFFFF">Adding Reminder</font></BLINK></h1>


                                                    <div data-role="main" class="ui-content">


                                                            Enter title and message for the reminder:

                                                            <input type="text" id="title" placeholder="Title" />

                                                            <input type="text" id="message" placeholder="Message" />

                                                            Enter date and time to trigger reminder:

                                                            <input type="date" id="date" />

                                                            <input type="time" id="time" />

                                                            <a target="_blank" href="javascript:add_reminder()" id="p" data-role="button" style="text-decoration: none"><font face="Times New Roman" color="red">Add</font></a>








                                            AND I WROTE THE JAVASCRIP CODE IN THE INDEX.JS AS BELOW


                                            // For an introduction to the Blank template, see the following documentation:

                                            // http://go.microsoft.com/fwlink/?LinkID=397704

                                            // To debug code on page load in Ripple or on Android devices/emulators: launch your app, set breakpoints,

                                            // and then run "window.location.reload()" in the JavaScript Console.

                                            (function () {

                                                "use strict";



                                                document.addEventListener('deviceready', onDeviceReady.bind(this), false);



                                                function onDeviceReady() {

                                                    navigator.notification.alert("this is my first notification app", onOKClickFuntion, "information", "ok");


                                                    // Handle the Cordova pause and resume events

                                                    document.addEventListener('pause', onPause.bind(this), false);

                                                    document.addEventListener('resume', onResume.bind(this), false);



                                                    // TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.

                                                    var parentElement = document.getElementById('deviceready');

                                                    var listeningElement = parentElement.querySelector('.listening');

                                                    var receivedElement = parentElement.querySelector('.received');

                                                    listeningElement.setAttribute('style', 'display:none;');

                                                    receivedElement.setAttribute('style', 'display:block;');


                                                function add_reminder() {

                                                    var date = document.getElementById("date").value;

                                                    var time = document.getElementById("time").value;

                                                    var title = document.getElementById("title").value;

                                                    var message = document.getElementById("message").value;



                                                    if (date == "" || time == "" || title == "" || message == "") {

                                                        navigator.notification.alert("Please enter all details");





                                                    var schedule_time = new Date((date + " " + time).replace(/-/g, "/")).getTime();

                                                    schedule_time = new Date(schedule_time);



                                                    var id = info.data.length;



                                                    cordova.plugins.notification.local.hasPermission(function (granted) {

                                                        if (granted == true) {

                                                            schedule(id, title, message, schedule_time);


                                                        else {

                                                            cordova.plugins.notification.local.registerPermission(function (granted) {

                                                                if (granted == true) {

                                                                    schedule(id, title, message, schedule_time);


                                                                else {

                                                                    navigator.notification.alert("Reminder cannot be added because app doesn't have permission");






                                                function schedule(id, title, message, schedule_time) {


                                                        id: id,

                                                        title: title,

                                                        message: message,

                                                        at: schedule_time




                                                    var array = [id, title, message, schedule_time];

                                                    info.data[info.data.length] = array;

                                                    localStorage.setItem("rp_data", JSON.stringify(info));



                                                    navigator.notification.alert("Reminder added successfully")



                                                function onPause() {

                                                    // TODO: This application has been suspended. Save application state here.




                                                function onResume() {

                                                    // TODO: This application has been reactivated. Restore application state here.


                                                var info = null;



                                            document.addEventListener("deviceready", function(){



                                              var rp_data = {data: []};

                                              localStorage.setItem("rp_data", JSON.stringify(rp_data));




                                            info = JSON.parse(localStorage.getItem("rp_data"));

                                            }, false);