Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PaulF_IntelCorp
Employee
315 Views

Deprecation of the CLI 4.1.2 Build Option

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.

Screen Shot 2016-02-16 at 4.32.27 PM.png

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:

Screen Shot 2016-02-16 at 4.40.31 PM.png

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 cordova-android@4.x 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.

Tags (2)
0 Kudos
34 Replies
Maycon_R_
Beginner
207 Views

build a community for intel XDK in Brazil

http://www.xdkplus.com

I can not migrate my applications , because the plugin

splash screen cord 5.1.1 no working plugin

 

 

PaulF_IntelCorp
Employee
207 Views

@Maycon -- can you attach a copy of the detailed build log so I can understand more precisely what is failing. The summary log doesn't give me the info I need.

saddam_h_
Beginner
207 Views

i cannot build my apps intel xdk .when adjusting plugin  and then show this.problem.JPG

saddam_h_
Beginner
207 Views

thi problem show my app build.

Chris_G_7
Beginner
207 Views

Hi Paul,

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.

Thanks,

-Chris

PaulF_IntelCorp
Employee
207 Views

@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.

PaulF_IntelCorp
Employee
207 Views

@Maycon --

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.

Tom_G_1
Beginner
207 Views

Under project i change BUILD SETTINGS > Cordova CLI version to 5.1.1
It ask me if i want to update plugins , so i select YES
When i check under Plugin Management it shows Device ver. 1.1.1 and InAppBrowser ver 1.2.0
I go to develop and check versions under plugins folder , both plugins are there
Next go to build select Android (same problem with iOS), it uploads project, hit build app now, takes the minute and always get this:
 

The build failed. An error occurred while building the application. Verify your build assets are correct and try again.
Build Log:
Building a Cordova 5.1.1 application.
The application name is "Polskie Radio 1030AM Chicago"
The package name is "com.polskieradio.www"
Error: Plugin "Device" failed to install.
Error: Plugin "InAppBrowser" failed to install.

Plugin "cordova-plugin-splashscreen" (2.1.0) installed.
Plugin "intel.xdk.audio" (1.2.2) installed.
Plugin "intel.xdk.device" (2.0.1) installed.
Plugin "intel.xdk.player" (1.2.3) installed.
Plugin "cordova-plugin-file" (2.1.0) installed.
Plugin "cordova-plugin-media" (1.0.1) installed.
Plugin "cordova-plugin-legacy-whitelist" (1.1.0) installed.

 

 

 

 

 

 

 

 

PaulF_IntelCorp
Employee
207 Views

@Tom -- are you including plugins in your intelxdk.config.additions.xml file? Is your project exported from Construct2?

Tom_G_1
Beginner
207 Views

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"/>

 

 

 

 

 

PaulF_IntelCorp
Employee
207 Views

@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

Tom_G_1
Beginner
207 Views

. @Paul - just want to say thank you for the help . Everything is working now

khin_sin_c_
Beginner
207 Views

Hi All,

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
  Error Code:
      2
  Output:
      
      UNEXPECTED TOP-LEVEL EXCEPTION:
      com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
          at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
          at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
          at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
          at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
          at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
          at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
          at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
          at com.android.dx.command.dexer.Main.run(Main.java:246)
          at com.android.dx.command.dexer.Main.main(Main.java:215)
          at com.android.dx.command.Main.main(Main.java:106)

khin_sin_c_
Beginner
207 Views

Hi,

Anyone could help as I plan to migrate to CLI 5.1.1 but this issue stopping me to proceed further.

Thanks

Regards,

Chan KS

Lucas_Mauro_L_
Beginner
207 Views

 
 
I recompiled 1 application with the CLI 5.1.1 for testing , but the error remains in playstore
 
Build Log:
  • Building a Cordova 5.1.1 application.
  • The application name is "Super Hits"
  • The package name is "xdk.intel.blank.ad.template.chi"
  • Preference android-signed set to true. Application will be signed.
  • Plugin "cordova-plugin-legacy-whitelist" (1.1.0) installed.
  • App name updated to [Super Hits]
  • Updated "minSdkVersion" with "20"
  • Updated "targetSdkVersion" with "2"
  • Updated "installLocation" to "auto"
  • Updated "versionCode" to "213"
  • Updated "versionName" to "1.0.2"
  • Added "debuggable" to "false"
 

How to fix apps with Apache Cordova vulnerabilities

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

  • CVE-2015-5256; applies to pre-4.1.1 versions of Apache Cordova. These versions are vulnerable to improper application of whitelist restrictions on Android. This results in a vulnerability where whitelist restrictions are not properly applied. Improperly crafted URIs could be used to circumvent the whitelist, allowing for the execution of non-whitelisted Javascript. Beginning May 9, 2016, Google Play will block publishing of any new apps or updates that use pre-4.1.1 versions of Apache Cordova. 
  • CVE-2015-1835; applies to pre-4.0.2 versions of Apache Cordova. These versions are vulnerable to remote exploit of secondary configuration variables in Apache Cordova on Android. Affected apps that don't have explicit values set in Config.xml can have undefined configuration variables set by Intent. This can cause unwanted dialogs appearing in applications and changes in the application behaviour that can include the app force-closing. Beginning May 9, 2016, Google Play will block publishing of any new apps or updates that use pre-4.1.1 versions of Apache Cordova.
  • CVE-2014-3502; applies to pre-3.5.1 versions of Apache Cordova. Vulnerabilities include a high severity cross-application scripting (XAS) vulnerability. Under certain circumstances, susceptible apps could be remotely exploited to steal sensitive information, such as user login credentials. The remediation deadline for this vulnerability has passed. Google Play will block publishing of any new apps or updates containing this vulnerability.

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.

PaulF_IntelCorp
Employee
207 Views

 

@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.

khin_sin_c_
Beginner
207 Views

Hi Paul,

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?

Thanks

Regards,

Chan KS

PaulF_IntelCorp
Employee
207 Views

@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.

khin_sin_c_
Beginner
207 Views

Hi Paul,

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:

 

BUILD FAILED

Total time: 1 mins 48.912 secs

.../MobileBizNet/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
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

 

PaulF_IntelCorp
Employee
122 Views

@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:

  • switch to CLI 5.1.1
  • remove facebook and email plugin
  • add back push plugin -- does it build now?
  • add back email plugin -- does it build?
  • add back facebook -- does it build or fail?

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.

Reply