Android Build Errors w/ Cordova InAppBrowser + Ionic on Mac

Background

  • I can compile default apps (i.e. sidemenu) just fine to both
    iOS and Android devices.
  • When I add Cordova’s InAppBrowser to the
    project, I can still compile fine for both devices.
  • When I copy my WWW project from my main project, I run into build errors.
  • These build errors don’t occur when building the project w/ WWW folder on Windows.

The Error
This is where Android breaks for me. Which is weird. I can compile the base projects just fine but adding InAppBrowser and copying the completed WWW breaks Android builds.

I have this working on my PC but I’d love to have one workstation for compiling apps, not two. :smile:

I get the following message:

BUILD FAILED
/Development/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:932: The following error occurred while executing this line:
/Development/adt-bundle-mac-x86_64-20140702/sdk/tools/ant/build.xml:950: null returned: 1

Total time: 2 seconds

/Users/dpeters911/Google Drive/Work/CUP/mobileapp/test6/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                      ^
Error code 1 for command: ant with args: debug,-f,/Users/dpeters911/Google Drive/Work/CUP/mobileapp/test6/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Users/dpeters911/Google Drive/Work/CUP/mobileapp/test6/platforms/android/cordova/run: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

Problem Solved
Fixed! I can finally compile my full app on Mac OSX for iOS and Android.

When copying the WWW folder into the refreshed folders, several hidden files appeared (“Icon”). I had to remove those files from all WWW subdirectories in order for Android to build the project correctly and push it to my android device.

These files are created by Mac OS when a folder has a custom icon. Since I backed up files to Google Drive, the “shared” folder icons would be set, creating the hidden .icon files.

1 Like

Updated problem solved post with background information on Mac OS .icon files and how cloud backup services that change folder icons on Mac can break Android compiling.