Software Archive
Read-only legacy content
17061 Discussions

Build error on Android (and Crosswalk) when using the Cordova Capture Plugin

Thomas_M_8
Beginner
705 Views

 

When i try to build an android app, and have enabled the cordova capture plugin, the build fails für android and android crosswalk.

I have tried it with the Version 0.3.5 and 0.3.6 of this plugin - always the same error. 

The following error:

_______________________________________________________________________________________

The build failed.

An error occurred while building the application. Verify your build assets are correct and try again.
You can view the log of the Android build here
Build Log:
  • Building a Cordova 4.1.2 application.
  • The application name is "SmartWerk"
  • The package name is "de.imc.research.smartwerk.mobile"
  • Preference android-signed set to false. Application will not be signed.
  • Plugin "org.apache.cordova.splashscreen" (0.3.5) installed.
  • Plugin "org.apache.cordova.geolocation" (0.3.11) installed.
  • Plugin "org.apache.cordova.file" (0.2.5) installed.
  • Plugin "org.apache.cordova.media-capture" (0.3.6) installed.
  • App name updated to [SmartWerk]
  • Updated "minSdkVersion" with "10"
  • Updated "targetSdkVersion" with "19"
  • Updated "installLocation" to "auto"
  • Updated "versionCode" to "1"
  • Updated "versionName" to "0.0.1"
  • Added "debuggable" to "false"
  • An unexpected error occured while attempting to build the application.

_______________________________________________________________________________________

In the Android Build Log, the last section with the error ist: 

_______________________________________________________________________________________

BUILD FAILED
/Developer/android-sdk-linux/tools/ant/build.xml:720: The following error occurred while executing this line:
/Developer/android-sdk-linux/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 4 seconds

.../SmartWerk/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: ant with args: release,-f,.../SmartWerk/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Command finished with error code 8: .../SmartWerk/platforms/android/cordova/build --release
Error: .../SmartWerk/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/Developer/cordova/4.1.2/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

 

0 Kudos
6 Replies
Amrita_C_Intel
Employee
705 Views

Are you including any 3rd party plugins? If so, try removing them and reuploading/building and see if the build works then. So the purpose of the exercise is to see if there is a specific third-party plugin that is causing the problem. In other words, does ANY third-party plugin cause the failure? Does only a specific plugin cause the failure? Does a specific version of a plugin cause the failure? If you can go through a few variations it will help to uncover what the issue is and get faster action on a fix.

Or else try to download the plugin and choose the option adding plugin locally and point to the location where you downloaded. It might solve your issue.

0 Kudos
Thomas_M_8
Beginner
705 Views

 

Hello Amrita, 
 

i have no third party plugins.
Im just using the delivered cordova plugins in XDK 1995...
And the error occures only, when i use the cordova capture plugin... I have already tried to disable all plugins and only enabled the cordova capture plugin, and then this error above stil occures.

When i choose "Third-party Plugin" and choose "Get Plugin from Web" and type as Plugin ID "org.apache.cordova.media-capture" and click on "Plugin is located in the Apache Cordova Plugins Registry" the exactly same error occures too.

When i download version 0.3.6 of this plugin and import it as a local plugin, the build fails too... 

So it seems, that the build process dont like the org.apache.cordova.media-capture plugin, whatever the way is, i try to install it.

And in all cases the error stil occures, when i disable all other plugins and only use this capture plugin.
 

Best Regards,
Thomas

0 Kudos
Amrita_C_Intel
Employee
705 Views

Perfect! I appreciate for the Information.

0 Kudos
Jaap_v_
New Contributor I
705 Views

Thanks for the info, I was running into the same issue!

It might be a good idea to automaticly let XDK select the required plugins when selected ..

0 Kudos
Anusha_M_Intel1
Employee
705 Views

Hi Coso,

If you try the Intel XDK Early Access edition, you can find that functionality implemented. Check out the plugin fetching feature in this post: https://software.intel.com/en-us/forums/topic/561050

In the Early Access edition we offer you the opportunity to try new features and for us to gather feedback from you regarding those new features. We intend for Intel XDK Early Access releases to be fully functional and tested, but since they contain experimental features you should expect some instability or odd behavior relative to the Intel XDK releases.

0 Kudos
PaulF_IntelCorp
Employee
705 Views

@Thomas -- the issue with the incorrect file plugin being fetched is a known bug. The EA version that @Anusha pointed to handles plugins in a completely different fashion, which will correct that problem.

0 Kudos
Reply