- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在创建一个简单的应用程序,它将使用react-native-firebase和react-native-maps。按照安装文档的说明,我已经启动并运行了 map ,没有任何问题。接下来,我已经安装了Firebase,并且还遵循了该教程。我在途中遇到了一些错误,但是清理gradle build等最终使我得到了“build success”的信息。但是,该应用在启动时始终崩溃。 Android Studio的logcat指出了此错误:
FATAL EXCEPTION: create_react_context
Process: com.demoapp, PID: 13267
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbfm;
at com.airbnb.android.react.maps.MapsPackage.createViewManagers(MapsPackage.java:39)
at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:770)
at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:170)
at com.facebook.react.CoreModulesPackage.access$200(CoreModulesPackage.java:53)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:128)
at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:125)
at com.facebook.react.LazyReactPackage$2$1.next(LazyReactPackage.java:102)
at com.facebook.react.LazyReactPackage$2$1.next(LazyReactPackage.java:89)
at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:44)
at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1212)
at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1182)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1120)
at com.facebook.react.ReactInstanceManager.access$900(ReactInstanceManager.java:123)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:943)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbfm" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.demoapp-0Fn4BfYJM0KChb969SjTxA==/base.apk"],nativeLibraryDirectories=[/data/app/com.demoapp-0Fn4BfYJM0KChb969SjTxA==/lib/x86, /data/app/com.demoapp-0Fn4BfYJM0KChb969SjTxA==/base.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "11.8.0"
androidMapsUtilsVersion = "0.5+"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
distributionUrl = distributionUrl.replace("bin", "all")
}
apply plugin: 'com.google.gms.google-services'
{
"name": "DemoApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.58.4",
"react-native-firebase": "^5.2.2",
"react-native-gesture-handler": "^1.0.15",
"react-native-maps": "^0.23.0",
"react-navigation": "^3.2.1"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.1.0",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
> Configure project :
Warning: Please apply google-services plugin at the bottom of the build file.
> Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from C:\workspace\copleybros\DemoApp\node_modules\react-native\android
> Task :app:compileDebugJavaWithJavac
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:4: error: cannot find symbol
import android.app.MultiDexApplication;
^
symbol: class MultiDexApplication
location: package android.app
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:17: error: cannot find symbo
public class MainApplication extends MultiDexApplication implements ReactApplication {
^
symbol: class MultiDexApplication
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:19: error: incompatible types: MainApplication cannot be converted to Application
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:19: error: cannot find symbol private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: constructor (MainApplication)
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:46: error: method does not override or implement a method from a supertype
@Override
^
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:48: error: cannot find symbol super.onCreate();
^
symbol: variable super
location: class MainApplication
C:\workspace\copleybros\DemoApp\android\app\src\main\java\com\demoapp\MainApplication.java:49: error: no suitable method found for init(MainApplication,boolean)
SoLoader.init(this, /* native exopackage */ false);
^
method SoLoader.init(Context,int) is not applicable
(argument mismatch; MainApplication cannot be converted to Context)
method SoLoader.init(Context,boolean) is not applicable
(argument mismatch; MainApplication cannot be converted to Context)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
7 errors
> Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 9s
48 actionable tasks: 1 executed, 47 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Command failed: gradlew.bat installDebug
Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:601:13)
at Object.execFileSync (child_process.js:621:13)
at runOnAllDevices (C:\workspace\copleybros\DemoApp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
at buildAndRun (C:\workspace\copleybros\DemoApp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12) at isPackagerRunning.then.result (C:\workspace\copleybros\DemoApp\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
最佳答案
由于Android X,React Native和Flutter中的大多数开发人员都面临着问题。您可以通过这个https://developer.android.com/jetpack/androidx/migrate
或者您可以使用库并构建与27而不是28相关的工具版本。
关于android - 安装Firebase和 map 后,应对 native fatal error 和应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54782056/
本文分享自华为云社区《【沃土方案--金融】银丰新融-反洗钱自主监测系统(一)》,作者:HuaweiCloudDeveloper 。 “三反(反洗钱、反恐怖融资、反逃税)”意见持续深化落实,第四轮互评估
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 9 年前。 Improve this ques
我们有一个数据驱动的 Activity ,它构建了一大组(通常最多 100 个)类似按钮的组件,并将它们放在一个 Scrollable 中。每个按钮都是从资源中膨胀的,并且基于 RelativeLay
我在一个非常早期的项目中使用 Hibernate EntityManager 和 Hibernate Annotations for ORM。该项目需要尽快启动,但规范不断变化,我担心系统将启动并收集
这是一个来自 SPOJ 的简单编程问题:http://www.spoj.com/problems/PROBTRES/ . 基本上,您需要输出 i 和 j 之间数字的最大 Collatz 循环。 (
由于 C++11 引入了新的统一初始化语法,许多人建议使用它来代替旧式语法。至少,如果不是这个所谓的极端情况: struct Foo { Foo(int){ std::cout
Log4J2漏洞涉及的影响太广了,昨天发文后很多粉丝留言问Spring Boot项目是否受到Log4J2漏洞影响。Spring官方已经全面进行了排查,现在大家可以知道这些信息和应对方法。 默认
我正在通过 UDP(视频数据)接收 RTP。 RTP 包含我需要解码的 H264。不幸的是,大多数 RTP 都包含零散的数据。由于缺少 RTP 序列,我无法正确重建 H264。 关于如何减少数据丢失以
我正在阅读 this thread并在解决方案中注意到,如果您发送的数据长度与实际数据分开,Nagle 的算法可能会播放和取消同步发送的数据。 我想知道这一点,因为我看到很多代码示例,客户端首先发送数
我正在创建一个简单的应用程序,它将使用react-native-firebase和react-native-maps。按照安装文档的说明,我已经启动并运行了 map ,没有任何问题。接下来,我已经安装
我是一名优秀的程序员,十分优秀!