[TIMOB-26272] Android: Building 7_3_X from source fails due to Android NDK error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2018-08-08T18:31:16.000+0000 |
Affected Version/s | Release 7.3.0 |
Fix Version/s | Release 7.3.1 |
Components | Android, CLI |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Joshua Quick |
Created | 2018-08-07T12:49:40.000+0000 |
Updated | 2018-08-13T17:33:16.000+0000 |
Description
Not sure why, but building 7_3_X locally with
node scons.js cleanbuild
currently failed. Initially reported by [~rlustemberg] [via Slack](https://ti-slack.slack.com/archives/C1BT2PKU3/p1533645190000091), I was just able to reproduce it.
*EDIT*: It may be because of a recent Android Studio update, because it tries to build with API 14?! I have 26 and 27 installed.
[exec] Android NDK: Found platform level in /Users/hknoechel/Documents/titanium_mobile/android/runtime/v8/project.properties. Setting APP_PLATFORM to android-10.
[exec] Android NDK: android-10 is unsupported. Using minimum supported version android-14.
[exec] Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersion 13 in /Users/hknoechel/Documents/titanium_mobile/android/runtime/v8/AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
Attachments
File | Date | Size |
---|---|---|
log.txt | 2018-08-07T12:52:17.000+0000 | 332575 |
Right. Setting the target to 10 is too low. The Android NDK built "project.properties" files should have their "target" changed to the min API Level we support, which is 16. This tells the Android NDK system which version of Android system .so libraries to link with.
We've isolated the issue. We need to back-port the following to 7.3.1. That'll solve it. https://github.com/appcelerator/titanium_mobile/commit/9efc6658510979171cad22fe17d84fd8e172db65#diff-3e4393dccf58a1d208359bc5823e0ace
Flagging as duplicate of [TIMOB-26130] which fixed it in 7.4.0. Scheduled back-port of fix to 7.3.1.
I've noticed that the fix from 7.4.0 was backported and then reverted. If I build from the backported merged commit, the build is successful. Where there side effects which caused the reversal?
The plan is to backport this change into 7.3.1, not 7.3.0. We got a little ahead of ourselves and merged it in too early before the 7.3.0 release.