0

I am very very new to Cordova, Android development, and Node.js applications.

I was using Cordova to create an Android app, it would spit out an android-debug.apk when I would go and build it.

BUILD SUCCESSFUL

Total time: 3.739 secs
Built the following apk(s):
    /Users/me/Git/myApp/platforms/android/build/outputs/apk/android-debug.apk
Running command: /Users/me/Git/myApp/platforms/browser/cordova/build 
Cleaning Browser project

Then I added Crosswalk plugin to help with some performance issues I was having and it worked great. Now when I try and build my app I get...

BUILD SUCCESSFUL
Total time: 2 mins 0.453 secs
Built the following apk(s):

Running command: /home/ubuntu/myapp/platforms/browser/cordova/build 
Cleaning Browser project

It is missing the apk!! Why and how can I get an android-debug.apk to build?

tester123
  • 1,033
  • 2
  • 12
  • 17
  • I've seen this happen to people. Save the important code. Delete the project. Start over from scratch. –  Oct 20 '15 at 20:26

2 Answers2

0

Check in that output directory (.../myapp/platforms/browser/cordova/build) for android-armv7-debug.apk and android-x86-debug.apk. At least on my OS X system, this is what the build system kicked out after adding the crosswalk plugin.

eb1
  • 2,897
  • 3
  • 31
  • 42
  • I have those, but any idea why it would output something different altogether? – tester123 Oct 21 '15 at 13:23
  • From [the docs](https://www.npmjs.com/package/cordova-plugin-crosswalk-webview): "The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/maven2/) and build for both X86 and ARM architectures." – eb1 Oct 21 '15 at 15:53
0

So after further investigation Crosswalk outputs two apks to support both x86 and armv7 architectures. If you want to (as such in my case) only output one single apk do the following:

Make a file build-extras.gradle and put it into platforms/android/. Add the following line to file you just created:

cdvBuildMultipleApks=false  

Now run cordova run android command, it will create combined single build android-debug.apk. You will see code of build.gradle doing this:

def hasBuildExtras = file('build-extras.gradle').exists()
 if (hasBuildExtras) {
   apply from: 'build-extras.gradle'
 }
tester123
  • 1,033
  • 2
  • 12
  • 17