Software Archive
Read-only legacy content
17061 Discussions

Could not build debug module (XDK 2893)

J_C_
Beginner
368 Views

Hi,

I'm having issues with trying to build a debug module for my app. I'm not entirely sure why it's like this, but I had no problems with this initially. Recently, I've been trying to get IAPs and other core Cordova plugins to work, so my focus was on adding those plugins, and releasing into the Google Play alpha channel, and debugging the IAP just to get things working on a basic level. So I haven't been using the debug module during this time.

I had some rare quirks recently with my dev machine, like having me to force it to shut down and losing debugging mode on my android test phone. So right now, I've just reestablished my dev setup and I'm testing out XDK to make sure I can still do my tests on the device directly, and so I've encountered this problem.

Right now it tells me that I need to update my debug module. So I hit that and wait for the debug build. It tells me that it "Could not generate a debug module". Under Debug Module Error, here's what's in red:

  • The App ID is "com.intel.appx.ProjectName.xwalk15"
  • The App Name is "AP Debug x15 ProjectName"
  • Application will be signed.
  • Plugin "cordova-plugin-network-information" (1.1.0) installed.
  • Plugin "intel.xdk.device" (2.0.1) installed.
  • Plugin "intel.xdk.cache" (1.2.3) installed.
  • Plugin "cordova-plugin-device" (1.1.0) installed.
  • Plugin "cordova-plugin-device-motion" (1.2.0) installed.
  • Plugin "cordova-plugin-device-orientation" (1.0.2) installed.
  • Plugin "cordova-plugin-root-detection" (0.1.1) installed.
  • Plugin "cc.fovea.cordova.purchase" (4.0.0) installed.
  • Plugin "com.intel.xdk.ppfa" (1.0) installed.
  • Updated "package" to "com.intel.appx.ProjectName.xwalk15"
  • App name updated to [AP Debug x15 ProjectName]
  • Updated "minSdkVersion" with "14"
  • Updated "targetSdkVersion" with "21"
  • Updated "installLocation" to "auto"
  • Added "screenOrientation" to "landscape"
  • Updated "versionCode" to "19"
  • Updated "versionName" to "0.1"
  • Added "debuggable" to "false"

 

A build log was provided. Here are the last several lines where the error was spotted:

-compile:
    [javac] Compiling 26 source files to .../builds/build.Uw_EUL.tmp/appanalyzer/platforms/android/bin/classes
    [javac] .../builds/build.Uw_EUL.tmp/appanalyzer/platforms/android/src/com/intel/xdk/device/Device.java:179: error: cannot find symbol
    [javac]         final ViewGroup parent = (ViewGroup) webView.getEngine().getView().getParent();
    [javac]                                                     ^
    [javac]   symbol:   method getEngine()
    [javac]   location: variable webView of type CordovaWebView
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error

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

Total time: 7 seconds

.../builds/build.Uw_EUL.tmp/appanalyzer/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: ant with args: release,-f,.../builds/build.Uw_EUL.tmp/appanalyzer/platforms/android/build.xml

 

And here's what it looks like in XDK. I've also attached the build log file if that's of any help.

 

debug-module-build-fail.jpg

491439

0 Kudos
5 Replies
J_C_
Beginner
368 Views

I tried removing some of the plugins to see what works and what doesn't. Here's what appears to work (tested this until it showed me it's downloading to my device or it throws me the build error):

  1. Remove all plugins (Core, XDK, 3rd Party) - OK
  2. Use only Core and XDK plugins - COULD NOT BUILD MODULE
  3. Use only Core plugins - OK
  4. Use only XDK plugins - COULD NOT BUILD MODULE
    1. Use only Intel XDK Cache plugin - OK
    2. Use only Intel XDK Device plugin - COULD NOT BUILD MODULE (THIS MIGHT BE THE CAUSE)
  5. Use only 3rd party plugins - OK
  6. Use core, XDK, and 3rd party plugins except 4b - OK
0 Kudos
Jiang__Peng1
Beginner
368 Views

I have same problem, and solved it by lowering version of Intel XDK Device plugin to 2.0.0. Try it, may be fresh version of Device plugin is buggy =)

0 Kudos
John_H_Intel2
Employee
368 Views

For what its worth, the Intel XDK plugins will be deprecated in the near future. You can still use them, but we highly recommend finding a similar Cordova plugin and switching to that.

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
368 Views

I am working in a brand new app, started with a blank template (Cordova). I inserted some plugins (none XDK, but the last one is listed as com.intel.xdk.ppfa).

I can build normally, but if I try to debug, I receive an error: Could not generate debug module.

Looking the list, all the plugins are instaled:

The App ID is "com.intel.appx.MoedaseMedalhas.xwalk15"

The App Name is "AP Debug x15 MoedaseMedalhas"
Application will be signed.
Plugin "cordova-plugin-statusbar" (2.0.0) installed.
Plugin "cordova-plugin-device" (1.1.0) installed.
Plugin "cordova-plugin-splashscreen" (2.1.0) installed.
Plugin "cordova-plugin-camera" (1.2.0) installed.
Plugin "cordova-plugin-inappbrowser" (1.1.0) installed.
Plugin "cordova-plugin-network-information" (1.1.0) installed.
Plugin "cordova-plugin-vibration" (2.0.0) installed.
Plugin "cordova-sqlite-storage" (0.7.14) installed.
Plugin "org.apache.cordova.dialogs" (0.3.0) installed.
Plugin "org.apache.cordova.globalization" (0.3.4) installed.
Plugin "com.google.playservices" (19.0.0) installed.
Plugin "com.cmackay.plugins.googleanalytics" (0.1.15) installed.
Plugin "com.google.admobsdk" (6.12.2) installed.
Plugin "cordova-plugin-admob" (2.2.0) installed.
Plugin "com.intel.xdk.ppfa" (1.0) installed.

What can be the error? How to solve it? Thanks.

0 Kudos
PaulF_IntelCorp
Employee
368 Views

Hamilton, that last plugin (com.intel.xdk.ppfa) is inserted automatically by the debug module builder, it is a helper plugin for the Debug tab.

My suspicion is the debug module builder is having a conflict with one of the plugins on lines 10 and 13-16. Easiest way to find out is by removing them and confirming that you can build a debug module. Then add back, one-by-one, the most important to the least important, building a new debug module after each attempt, until you find the one that is causing the troubles.

Once you find the one that is causing troubles, I would simply debug without that plugin, you might have to add some conditional code around those places in your app that make calls to those APIs, so you avoid calling something that is not there.

p.s. You should also update the versions of those other two core plugins (org.apache.cordova.dialogs and org.apache.cordova.globalization), you are using the CLI 4.1.2 versions for those plugins.

0 Kudos
Reply