Skip to content

Commit 536f2d0

Browse files
author
zhoudonghua
committed
Fixed mobx@5.6.0 on android's devices
1 parent 31ea064 commit 536f2d0

5 files changed

Lines changed: 17 additions & 2 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,3 @@ yarn android
9696
![](https://ws3.sinaimg.cn/bmiddle/006tNbRwly1fx5gf7ermij30v91vo13j.jpg)
9797

9898
### Thanks
99-

android/app/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ android {
136136
}
137137
}
138138

139+
configurations.all {
140+
resolutionStrategy {
141+
force 'org.webkit:android-jsc:r236355'
142+
}
143+
}
144+
139145
dependencies {
140146
compile project(':react-native-blur')
141147
implementation fileTree(dir: "libs", include: ["*.jar"])

android/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildscript {
44
ext {
55
buildToolsVersion = "27.0.3"
6-
minSdkVersion = 16
6+
minSdkVersion = 21
77
compileSdkVersion = 27
88
targetSdkVersion = 26
99
supportLibVersion = "27.1.1"
@@ -29,6 +29,10 @@ allprojects {
2929
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
3030
url "$rootDir/../node_modules/react-native/android"
3131
}
32+
maven {
33+
// Local Maven repo containing AARs with JSC library built for Android
34+
url "$rootDir/../node_modules/jsc-android/dist"
35+
}
3236
}
3337
}
3438

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"babel-jest": "23.6.0",
3333
"babel-preset-mobx": "^2.0.0",
3434
"jest": "23.6.0",
35+
"jsc-android": "^236355.0.0",
3536
"metro-react-native-babel-preset": "0.49.0",
3637
"prettier": "^1.15.1",
3738
"react-addons-test-utils": "^15.6.2",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3720,6 +3720,11 @@ jsbn@~0.1.0:
37203720
resolved "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
37213721
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
37223722

3723+
jsc-android@^236355.0.0:
3724+
version "236355.0.0"
3725+
resolved "http://registry.npm.taobao.org/jsc-android/download/jsc-android-236355.0.0.tgz#22795b980e1cded0fc19a7f95fe780601cec8377"
3726+
integrity sha1-InlbmA4c3tD8Gaf5X+eAYBzsg3c=
3727+
37233728
jsdom@^11.5.1:
37243729
version "11.12.0"
37253730
resolved "http://registry.npm.taobao.org/jsdom/download/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8"

0 commit comments

Comments
 (0)