我的反应原生应用程序有以下package.json
{
"name": "Seller",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"cleanA": "cd android && ./gradlew clean && cd ..",
"apk": "cd android && ./gradlew assembleRelease && cd .."
},
"dependencies": {
"@react-native-community/async-storage": "^1.10.3",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "0.1.6",
"@react-native-community/picker": "^1.4.0",
"@react-native-firebase/app": "^6.7.1",
"@react-native-firebase/auth": "^6.7.1",
"@react-native-firebase/messaging": "^6.7.1",
"@react-navigation/bottom-tabs": "^5.3.3",
"@react-navigation/drawer": "^5.6.3",
"@react-navigation/material-top-tabs": "^5.1.14",
"@react-navigation/native": "^5.2.3",
"@react-navigation/stack": "^5.2.18",
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-chart-kit": "^5.5.0",
"react-native-elements": "^2.0.0",
"react-native-gesture-handler": "~1.6.0",
"react-native-image-picker": "^2.3.1",
"react-native-reanimated": "~1.7.0",
"react-native-safe-area-context": "0.7.3",
"react-native-screens": "~2.2.0",
"react-native-svg": "^12.1.0",
"react-native-tab-view": "^2.14.0",
"react-native-vector-icons": "^6.6.0",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.58.0",
"react-test-renderer": "16.11.0"
},
"jest": {
"preset": "react-native"
}
}
它在Android5.0及以上版本上运行良好。最小SDK版本为16.然而,它不是运行在Android 4.3
异常跟踪如下所示:
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: org.reactnative.maskedview.RNCMaskedViewPackage
at com.facebook.react.PackageList.getPackages(PackageList.java:87)
at com.khareeddari.seller.MainApplication$1.getPackages(MainApplication.java:27)
at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:77)
at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
at com.khareeddari.seller.MainApplication.onCreate(MainApplication.java:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4684)
at android.app.ActivityThread.access$1400(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
我试图在android/build中更改
。然而,在那之后,我得到了依赖包中的编译器,因为它们不是用Java1.6编译的。compileSdkVersion
。渐变
解决这个问题的步骤是什么?
这可能是一个Multidex问题,因为在android 5.0及更高版本上默认启用了Multidex。如果你运行APK
https://developer.android.com/studio/build/multidex
因此,我正在创建一个React本机应用程序,我想从应用程序的本机部分调用JavaScript函数。 我知道我可以使用Native模块在Native和React Native之间建立一座桥梁,我还知道从Native模块我可以发出React Native可以接收的事件。 但是,本机模块内的任何函数调用只能从React本机本身内部发生,因为它需要一个React本机上下文,因此我只能在React本机本身调
所以我遇到了一个非常奇怪的问题,我只是使用npx create-react-app初始化我的应用程序,删除不必要的文件,做了一个eslint和更漂亮的配置并运行了应用程序,我在这里看到了两个问题,第一个是我的应用程序不显示应用程序.js内容,第二个是“链接”到我的应用程序不仅仅是本地主机:3000一如既往, 是的 有人有这样的问题吗?我该怎么办?
无法解析com.android.tools.build:gradle:2.3.0。 无法获取资源“https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.0/gradle-2.3.0.pom”。无法领导“https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.
我有一个用Kotlin(android studio)编写的android应用程序和用React Native编写的应用程序的UI。我的问题是这些能联系在一起吗?如果是,怎么做?还有,你们能发布一些我可以通过的链接吗。 附注:我对react Native一无所知。
我正试图在Android设备上运行我的应用程序:AmazonFireTV。 此构建可能会更快,请考虑使用Gradle守护进程:https://docs.Gradle.org/2.14.1/userguide/gradle_daemon.html Running/users/xxxx/library/android/sdk//platform-tools/adb-s 68.128.177.159:5
我在windows上构建了一个react原生应用程序,当我试图在mac上运行它时,它会给我一个错误。只有当我尝试运行Android系统时,它才显示出这个错误,ios运行得非常完美。在我在mac上构建之后,它甚至在之前编码的windows系统中也不会运行。 错误:-