Ionic and Crosswalk Can't Generate Signed APK


#1

I am trying to add crosswalk to my ionic. My apps are launched and working fine. However after I added Crosswalk, I can’t generate signed apks anymore. I tried to remove crosswalk and it works again. How did you guys manage to get it working?

Here’s what I did:

cordova plugin add cordova-plugin-crosswalk-webview
cordova platform add android
ionic build android

it builds fine except:
BUILD SUCCESSFUL

Total time: 1 mins 34.909 secs
Built the following apk(s):
<— this part is empty, usually it’ll show the path of the apk generated

In Android Studio I get this error for the gradle sync.
NDK integration is deprecated in the current plugin.

When I try to generate signed apk, I get this error:
Missing Gradle Project Information. Please check if the IDE successfully synchronized its state with the Gradle Project Model.


#2

you try with eclipse. update build tools.


#3

Hi.
Did you try adding crosswalk with ionic directly? Running
ionic browser add crosswalk

I’ve also seen that the “Built the following apk(s)” is empty, but the apk is generated anyway, you can find it on the ./platforms/android/build/outputs/apk/ folder inside your project.

Hope it helps. Best regards.


#4

It tells me “The browser task has been deprecated.”


#5

Deprecated doesn’t mean it won’t work now, it will probably won’t work on the future.
Try removing android and adding an older version:
cordova platform rm android cordova platform add android@4.1

In my case Crosswalk is not added unless I use add android 4.1
But I guess your apk is being generated and you just can’t find it.
Executing:
find . -name '*.apk'
from your project root folder perhaps can help.


#6

Thank you so much jsanta. I use android@4.1, reinstalled the sdk22 and it worked without any errors.

What does using android@4.1 mean for me? Will using old version of sdk affect me?


#7

For one of my apps, I’m getting this error when publishing to play store.

It is forbidden to downgrade devices which previously used M permissions (target SDK 23 and above) to APKs which use old style permissions (target SDK 22 and below). This occurs in the change from version 103098 (target SDK 23) to version 104004 (target SDK 22).

It doesn’t let me ionic build android for android@4.1 using sdk 23, i have to use sdk 22. any ideas?


#8

Using the 4.1 version only ensures that Crosswalk is added to the apk. It’s a 20MB (or so) extra to your app, but it will work on Android 4.1 devices.
What you should probably do is use the multiple apk version deploy on the Play store. That is compile different versions of the app and “let Google decide” which one should be installed on different devices.


#9

I am just using two versions right now, x86 and armv7. How do I do the multiple apk version deploy for crosswalk only for 4.1?

Does this method help me fix the sdk 23 problem?