Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
25 Views

Minimum Android API not respected? (Crosswalk)

Hi,

Does anyone else have a problem with Mninimum Android API setting? I have it set up to 19 (4.4 KitKat) and Target Api to 21. However when I send my app to Google Play for alpha/beta testing, on my app page on Google Play states that the minimum requirement is Android 4.0.

My game is pretty resource consuming so I want to publish it only for stronger devices. Releasing it for devices with Andoid 4.0-4.3 is not acceptable for me.

I really got stuck here. Does anyone have noticed simillar issue?

ps. I use the newest IntelXDK, Crosswalk 15.

Tags (2)
0 Kudos
25 Replies
Highlighted
New Contributor I
25 Views

I have decompiled an APK file to check what's in the config.xml which has been compiled to the APK and it looks allright "<preference name="android-minSdkVersion" value="19" />". So it clearly a Google bug I believe.

0 Kudos
Highlighted
25 Views

I believe there was another thread with someone reporting the same problem. Not clear what is causing this to happen.

0 Kudos
Highlighted
New Contributor I
25 Views

I have posted this issue on Scirra forum, Stackoverflow and here. I am really surprised that noone knows anything about this issue. Anyway I've also sent a ticket to Google already, we will see what they gonna say.

0 Kudos
Highlighted
New Contributor I
25 Views

Again back to the (unsolved) topic.

As I mentioned above my config.xml contains "<preference name="android-minSdkVersion" value="19" />" which is ok. But AndroidManifest.xml generated by IntelXDK does not mention anything regarding the minimum android API - there is simply no entry about that.

Regarding this Google article: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html AndroidManifest.xml should have it.

Otherwise (as states in the article): "Caution: If you do not declare this attribute, the system assumes a default value of "1"".

The article mentiones a default value as "1", but as I use CLI 5.1.1, the default is 14. And that would fit the current situation. So it looks like IntelXDK forgots to add this entry into Manifest file? So it turns out that it looks like an IntelXDK bug?

0 Kudos
Highlighted
New Contributor I
25 Views

I'm trying now to add min and target api settings to AndroidManifest.xml file by writing a simple one-file local plugin.

Based on what is in the FAQ (https://software.intel.com/en-us/xdk/faqs/general#android-manifest) I've made something like that:

<?xml version="1.0" encoding="UTF-8"?> 
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="com-wtfgamesgroup-versioning-fixer" version="1.0.0">
   <name>Versioning fixer</name>
    <description>Add Min and Target SDK to AndroidManifest.xml</description>
    <license>MIT</license>
    <engines>
        <engine name="cordova" version=">=3.0.0" />
    </engines> 
    <!-- android -->
    <platform name="android">
        <config-file target="AndroidManifest.xml" parent="/manifest/application">
            <uses-sdk android:minSdkVersion="19"
          android:targetSdkVersion="21" />
        </config-file>
    </platform> 
</plugin>

I've added plugin to the project. Built a project and downloaded APK. After decompiling APK with apktool I still don't see those entries there. I am not experienced in writing plugins. Could some expert say if this XML is correct or not? Thanks.

0 Kudos
Highlighted
25 Views

Tobiasz -- I've confirmed what you are seeing. It only appears in the Crosswalk builds, the Android builds do the right thing. The build log for both indicates that the build system updated the minSdkVersion and the targetSdkVersion, but the minSdkVersion appears to be getting overwritten.

I'm filing a bug report with the build engineers. This may be a Crosswalk plugin problem, since the build system is nearly identical when you use CLI 5.1.1 to build Crosswalk, since it now uses the new "pluggable webview" approach to build Crosswalk for Android.

p.s. Your plugin looks fine, I think the version number is being clobbered by something else, probably the Crosswalk pluggable webview plugin, because Crosswalk requires a minimum API of 14, and the authors may have forced that in order to insure it does not get installed on older Android systems, with this painful side effect.

0 Kudos
Highlighted
New Contributor I
25 Views

Can you tell when can we expect the fix? Is it matter of days or weeks or?
0 Kudos
Highlighted
25 Views

We have to identify the source of the problem before we can make an estimate. We're in the midst of a major release, which is going to slow this down. I would not expect it to be fixed this week, best case next week, worst case would probably be a few weeks, depends on progress with this major release work.

p.s. If you're targeting 4.4 and above, all of those versions of Android include a Chrome-based webview, so they are reasonably good native webviews (although, the performance of the 4.4 webviews is substantially lower than that of Crosswalk). Depends on what your app does and needs...

0 Kudos
Highlighted
New Contributor I
25 Views

This is really very bad news for me :(. I can't release the app like that, and I am already on hold for many days inspecting this issue... The reason why I'm targeting 4.4+ is because my app needs some stronger devices. Native webview is not an option for me, it's way too slow. I even tried native webview on 5.0, and it was also horribly slow.

I believe there is no way I could override AndroidManifest.xml if even a plugin does not work?

The last thing that came to my mind is to exclude devices in Google Play Developer console... but in other hand... thousands of devices, I don't think it's doable to do such a filtering manually.

0 Kudos
Highlighted
25 Views

As a shortcut, you can use Cordova CLI to build your app. I realize that takes more effort, but if you need something right now, that's the best way to get there. The app is a Cordova app, it's just missing some of the build plumbing required in the project directory, but you can create a clean app with Cordova CLI and then move your code into that CLI template and continue from there. You'll have to convert the XDK build settings into preferences in the config.xml file, but that's not that hard, just look at the intelxdk.config.*.xml files for most of that info.

Obviously, this approach requires that you have to come up-to-speed with Cordova CLI and install Android Studio, node, npm, etc., but it is the quickest route if you need to get there right now. There's another recent post somewhere on the forum where I provide some links to the docs you need to make that build work for Crosswalk. And I would install either CLI 5.4.1 or CLI 6.0.0 if you choose this path.

0 Kudos
Highlighted
New Contributor I
25 Views

It sounds like a challange to me, but let's give it a shot! Thanks for the tips Paul!

0 Kudos
Highlighted
New Contributor I
25 Views

There is one more thing which I think is wrong but I might be wrong. There are different CLI versions in two crosswalk XML files.

In intelxdk.config.crosswalk.app.xml file it states "<intelxdk:cordova-cli version="4.1.2"/>"

In intelxdk.config.crosswalk.xml file it states "<intelxdk:cordova-cli version="5.1.1"/>"

Shouldn't it be 5.1.1 everywhere?

0 Kudos
Highlighted
25 Views

That intelxdk.config.crosswalk.app.xml file is not used by the CLI 5.1.1 build system, I'm not sure where that came from, I had one in my test project, as well, but it's not a config file that's normally used. You can delete all of those intelxdk.config.*.xml files EXCEPT intelxdk.config.additions.xml, that one is NOT auto-generated, and then push the Test tab and they will be regenerated (they will also be regenerated when you start a build on the Build tab).

0 Kudos
Highlighted
New Contributor I
25 Views

Hi Paul, any new regarding fix for this issue?

0 Kudos
Highlighted
25 Views

The issue has been assigned, but no progress at this time. We're in the midst of a big release. I tested against our staging build system and I still see the same results. Not sure how long it will take to fix this issue.
 

0 Kudos
Highlighted
New Contributor I
25 Views

Is it possible to download some older IntelXDK version where it worked? Is there any archive download section? And if so is it possible to point the latest version number which did not have this bug?

0 Kudos
Highlighted
25 Views

The build system and the XDK are independent entities. All versions of the XDK use the same build system. The build system is where this problem resides, not the XDK. Moving to an older version of the XDK won't fix it.

0 Kudos
Highlighted
25 Views

Tobias -- if you build a "shared-mode" Crosswalk app you will get the results you want (the minSdkVersion is respected). In that case, your app must be distributed via the Google Play store and the first time it is run your user will be directed to download the Crosswalk shared-mode library (see https://software.intel.com/en-us/xdk/docs/choosing-crosswalk-build-options-shared-or-embedded). You can later convert to an embedded-mode distribution, once the issue is fixed.

---- update ----

Tobias, I was using our staging system and building with CLI 5.4.1 and it worked there (for embedded Crosswalk and shared builds). I then went back and tested with CLI 5.1.1 and it failed (forced minSDKVersion to 14 for both types of builds). It appears to be a Cordova problem in that version of CLI. So, my suggestion (above) won't work with our current production build system. But our new build system will work, if you switch to CLI 5.4.1 (which you should do when that comes out, and upgrade to CW16). It will be out very soon...

0 Kudos
Highlighted
New Contributor I
25 Views

Thanks for this update Paul. Is it possible to say what "very soon" approximately means? I have a deadline with releasing my app on 1st of March and I'm working parallelly now with IntelXDK and CocoonIO trying to pick the best currently possible option for me. Also have some performance issues recently with IntelXDK, but that's another topic...

0 Kudos