react-native-community / jsc-android-buildscripts

Script for building JavaScriptCore for Android (for React Native but not only)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minSdkVersion 16

ashconnell opened this issue · comments

commented

Trying to use this with a fresh react-native build gave me this error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [org.webkit:android-jsc:r224109] /Users/ashconnell/code/rnProxyTest/android/app/build/intermediates/exploded-aar/org.webkit/android-jsc/r224109/AndroidManifest.xml
        Suggestion: use tools:overrideLibrary="org.webkit.androidjsc" to force usage

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I opened up android/app/build.gradle and changed minSdkVersion from 16 to 21 and it worked.

Should this go in the readme?

Good catch, it should be in the README

The 216113 version of jsc-android we are using doesn't require version 21. We are using fine with minSdkVersion=17. Are newer versions of this library requiring 21 now for 64-bit support? Will it be possible to use the newer JavaScriptCore with lower minimum requirements?

That's a good question.
From 224109.0.0 the engine itself is compiled with the ndk toolchain and -DCMAKE_SYSTEM_VERSION set to android api 21, due to it relying on some missing cstrings functions in earlier sdk versions.
Supporting x64 makes targeting 21 a requirement by toolchain, but I'm not sure about if it is still needed in runtime on arm devices.
@newyankeecodeshop Did actually test this running on old android phones (api 17)?

confirmed cannot link jsc in api19

I need support for older devices
API >= 17