[TIMOB-19898] Cannot build on a Nexus5x device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-16T01:43:11.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.1.0 |
Components | Android |
Labels | n/a |
Reporter | Rick Blalock |
Assignee | Chris Barber |
Created | 2015-11-09T23:12:13.000+0000 |
Updated | 2015-11-17T20:06:03.000+0000 |
Description
When trying to build to a Nexus 5x I get the following:
[ERROR] The device "Nexus 5X" does not support the desired ABIs "armeabi", "armeabi-v7a", "x86"
[ERROR] Supported ABIs: arm64-v8a, arm64-v8a,armeabi-v7a,armeabi, armeabi-v7a,armeabi, arm64-v8a
You need to add at least one of the device's supported ABIs to the tiapp.xml
<ti:app xmlns:ti="http://ti.appcelerator.org">
<!-- snip -->
<android>
<abi>armeabi,armeabi-v7a,x86,arm64-v8a,arm64-v8a,armeabi-v7a,armeabi,armeabi-v7a,armeabi,arm64-v8a</abi>
</android>
</ti:app>
If I use ANY of the “supported ABI’s” mentioned in that message, in the tiapp.xml, they do not work and get the following:
[ERROR] Invalid ABI "arm64-v8a"
Valid ABIs:
armeabi
armeabi-v7a
x86
If I enter ANY of those “valid ABI’s”, I get the previous message saying NExus 5x doesn’t support it.
I can confirm that the Nexus 5x has the following: ro.product.cpu.abi=arm64-v8a
Here is what a ti info provides on this device:
{
"id": "00ab2d5a616eadc9",
"state": "device",
"sdk": "23",
"release": "6.0",
"model": "Nexus 5X",
"brand": "google",
"name": "Nexus 5X",
"device": "bullhead",
"abi": [
"arm64-v8a",
"arm64-v8a,armeabi-v7a,armeabi",
"armeabi-v7a,armeabi",
"arm64-v8a"
],
"manufacturer": "LGE",
"emulator": false
}
This isn't new. This came up with the Nexus 9 nearly a year ago. Solution then was to hack the _build.js to not block the building based upon hardcoded validABIs. As of the date of this posting, hard coded values at line 72, comparison starts around line 1226.
[~sfeather] It's due to a typo... 1 little character. Fix is coming as soon as I have 1 minute, cuz that's exactly how long it'll take to fix. :)
We read the build properties of the device's OS and search for any line that contains the string
ro.product.cpu.abi
. The problem is newer devices have introduced new properties that we now match multiple times causing the discovered ABIs to be whack. Here's an example:TiSDK PR: https://github.com/appcelerator/titanium_mobile/pull/7423 To test, plug in a Nexus 5x and run
ti info -t android
. Look in the output for the "devices" section and verify the device's ABIs is indeed an array of strings and that the value looks sane.Just tested on my Nexus 5x:
Not sure why there are duplicated ABI's but it does indeed compile and run now. (golf clap) [~cbarber]
[~rblalock] There should not be duplicates. I should split each list of ABI's by a comma, then insert unique ones one. Since you have a device, can you please fix my code?
[~cbarber] I just wrapped all your code in this and it works:
(I'll look at it)
Ok the dup's were my mistake: When running ti info, I was using GA but when building the app I was using the SDK with your fix. Ensured I was running ti info using your fix and it properly displays:
CR and FT passed. PR merged.
5_1_X Backport: https://github.com/appcelerator/titanium_mobile/pull/7449
Verified the fix. We can successfully build to Nexus 5X device also ABI's for the device shows :
Closing. Environment: Appc Studio : 4.4.0.201511101919 Ti SDK : 5.1.0.v20151116164430 Ti CLI : 5.0.5 Alloy : 1.7.26 MAC Yosemite : 10.10.5 Appc NPM : 4.2.1 Appc CLI : 5.1.0-60 Node: v0.10.37 Nexus 5X - Android 6.0