We are deprecating the Intel XDK Cordova CLI 4.1.2 build system. This means that the CLI 4.1.2 build option will be retired at a future date (currently planned for March, 2016). We recommend that you start moving your projects to use the Intel XDK Cordova CLI 5.1.1 build option in preparation for the eventual discontinuation of the CLI 4.1.2 build option. Once CLI 4.1.2 is retired, you will no longer be able to use the Intel XDK to build apps with Cordova CLI 4.1.2.
We are aware that some apps currently require the CLI 4.1.2 option to successfully build. In some cases those are related to using Xcode 6 on our iOS build system, which will be resolved by the time the CLI 4.1.2 build option is retired, at which time we will have an iOS build option that employs Xcode 7. In other cases they are related to specific plugin issues.
If you have some specific issues that prevent you from using CLI 5.1.1, please provide details regarding the reason you must use CLI 4.1.2 as a post to this thread so we can be sure to address those issues before the CLI 4.1.2 build system is retired.
---- How do I upgrade my project to CLI 5.1.1? ----
If you would like to make a copy of your project before upgrading to CLI 5.1.1, follow the instructions here > https://software.intel.com/en-us/xdk/faqs/general#copy-existing-xdk-project -- strictly speaking, it is not necessary to make a copy of your project, but it may help to have the second copy for comparing changes from "what worked" to "what doesn't work anymore."
Upgrade the CLI version used by your project by clicking the CLI "pencil icon" to move your app from CLI 4.1.2 to CLI 5.1.1. This icon can be found in the "Build Settings" section of the Projects tab.
After you select 5.1.1 and click "Continue" in the dialog that appears, it is very likely that you will be asked to upgrade some of your project's Cordova plugins. In most cases the list of plugins to be upgraded will only be the core Cordova plugins. It is generally best to perform the upgrade of the plugins, along with the CLI version:
The list of plugins to be upgraded will reflect the list of plugins that are part of your project; your list may be shorter or longer than what is shown in the dialog box above.
You can change the CLI version used by ALL of your platforms by checking the "Apply this new CLI version..." checkbox (this should be checked by default). This will move Android, iOS, Windows and Crosswalk platforms to the new CLI version. Trying to use different CLI versions in each platform is difficult, because the plugin versions are universal (only one set of plugins is used across all platforms), so it is highly recommended that you check the box and change all platforms to use the same CLI version.
IMPORTANT! If you have previously published your app using Crosswalk, the "Please read" link is very important. It explains how to deal with a change in the way Crosswalk APK versionCode numbers are calculated with the release of Cordova CLI 5. If you have never published a Crosswalk app to an Android store you can safely ignore that please read link.
If your Android "Minimum Android API" version is set to 10 you should change it to 14. The build system will do this automatically for you when you perform a build, but it will issue a warning if your minimum Android versionCode is less than 14. The email@example.com platform does not support Android 2.x or Android 3.x; thus, the lowest version of Android you can build for with CLI 5.1.1 is Android 4.0 (which corresponds to Android API level 14). Crosswalk has always required Android 4.0 (API level 14) as the minimum install version.
I currently don't use the 5.1.1 app because for some reason Crosswalk 15 crashes (or better puts the app in a state where nothing works) my app when returning from pause. This happens whens coming back from google play game services or closing an admob ad.
It works totally fine in 5.1.1 which uses the native build (not crosswalk) and it is fine in Crosswalk 14. It only happens after 2 or 3 times of returning from the pause state too.
I also tried the new performance tuning options to see if this made a difference, it didn't.
Could be my code too, not sure. Works fine everywhere else.
@Saddam, thanks for that feedback. We're working on getting CW14 provided in the CLI 5.1.1 build option. When that is available it would be interesting to try your app with CW14 and CLI 5.1.1 to see if it works with that combination. I'll post a note in this thread when that option is available, along with instructions on how to do it.
The problem you are experiencing is due to the fact that you are using some JPG images as your icons or splash screens. With the change to CLI 5 the Cordova project decided to restrict those assets to PNG. Our UI did not get updated to reflect that restriction, thus the confusion (and the fact that JPG work with CLI 4.1.2).
Convert all your icons and splash screens to PNG format and CLI 5.x builds should work.
Paul, i don't have intelxdk.config.additions.xml file. From what i see i have ex. intelxdk.config.android.xml file (one config file per OS) and in this file
<intelxdk:plugin intelxdk:name="Device" intelxdk:value="org.apache.cordova.device" intelxdk:version="1.1.1" intelxdk:checksum="927290ca"/> <intelxdk:plugin intelxdk:name="InAppBrowser" intelxdk:value="org.apache.cordova.inappbrowser" intelxdk:version="1.2.0" intelxdk:checksum="57660864"/>
@Tom -- try removing and re-installing the two problem plugins using the Plugin Management tool on the Projects tab. See this post for some more details > https://software.intel.com/en-us/forums/intel-xdk/topic/607190
I try to do an upgrade from CLI 4.1.2 to CLI 5.1.1, i have attach error as below (i attach the error log as well). Could you please help to advise?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dexRelease'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Developer/tools/adt-bundle/android-sdk/build-tools/21.1.2/dx --dex --output .../MobileBizNet/platforms/android/build/intermediates/dex/release --input-list=.../MobileBizNet/platforms/android/build/intermediates/tmp/dex/release/inputList.txt
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
This information is intended for developers of apps that utilize any version of Apache Cordova that precedes 4.1.1. These versions contain security vulnerabilities and are in violation of the Dangerous products provision of the Content Policy andsection 4.4 of the Developer Distribution Agreement.
Please migrate your app(s) to Apache Cordova v.4.1.1 or higher as soon as possible and increment the version number of the upgraded APK. If you are using a 3rd party library that includes Apache Cordova, please notify the 3rd party and work with them to address the issue.
Vulnerabilities and Remediation Deadlines
Upgrading and technical questions
For help upgrading, please see the Apache Cordova website. If you have other technical questions about Apache Cordova, please post to https://www.stackoverflow.com/questions and use the tags “android-security” and “cordova.”
To confirm you’ve upgraded correctly, submit the updated version to the Developer Console and check back after five hours. If the app hasn’t been correctly upgraded, we will display an alert.
Note: while these issues may not affect every app that uses Apache Cordova versions prior to 4.1.1, it’s best to stay up to date on all security patches. Please take this time to update apps that have out-of-date dependent libraries or other vulnerabilities.
@Lucas -- please read this post > https://software.intel.com/en-us/forums/intel-xdk/topic/609583
@Khin -- according to your error log, you're using the following list of plugins:
'org.apache.cordova.device', 'org.apache.cordova.splashscreen', 'org.apache.cordova.dialogs', 'org.apache.cordova.device-motion', 'org.apache.cordova.camera', 'de.appplant.cordova.plugin.email-composer', 'com.phonegap.plugins.facebookconnect', 'phonegap-plugin-push',
It is not clear what the exact problem is, but I suspect there is a conflict or issue with one of your plugins. Try removing them, one-by-one, and building after each removal until you find the one that is causing the build failure. From there it will be easier to figure out why there is a build failure. I would start at the bottom of the list (above) and work your way up, it is likely one of the last three in the list that is causing the problem.
Yes, you are right. by removing the phone-gap plugin push, i can build. But why with the plugin added, the build allow the plugin to be installed but fail the build process? Is this something due to the plugin or xdk itself? Any suggestion?
@Khin -- when you add a plugin to the project it only includes it in the project, it does not perform a build. So any issues related to building will not be found at that time, only at build time (which happens in the cloud, not on your development machine). The process of adding to your project does not confirm that a plugin is good or perform a build, it only confirms that it exists and adds the source code associated with that plugin to your project.
Thanks. So what could i do next since i require the plugin for the push notification feature? Hereby i upload the log file. the log file said below:
Total time: 1 mins 48.912 secs
Error code 1 for command: .../MobileBizNet/platforms/android/gradlew with args: cdvBuildRelease,-b,.../MobileBizNet/platforms/android/build.gradle,--no-daemon
Command finished with error code 8: .../MobileBizNet/platforms/android/cordova/build --release
ERROR building one of the platforms: Error: .../MobileBizNet/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
@Khin -- there's not enough information in the build error log to pinpoint the problem. My suspicion is you have a conflict between that plugin and another (the facebook plugin is usually a problem). Again, you need to do more experimentation, I don't have a specific reason for the problem. For example remove the facebook plugin and the email composer.
Also, based on the plugin IDs you are using it appears that you are using CLI 4.1.2. That build system has been deprecated and will go away very soon. Change to the CLI 5.1.1 build system. So my recommendation is:
In other words, removing one plugin does not prove that it is the source of the problem, it may be a conflict between two plugins.
From there, you may be able to use some different versions of the conflicting plugins to fix the problems. You may have to review the issues on the various plugin github repos or review issues in stackoverflow. Remember, the XDK creates a standard Cordova app, so issues related to cordova problems with plugins are relevant.