Facebook f8app 环境搭建以及问题处理
来源:互联网 发布:淘宝提前收款什么意思 编辑:程序博客网 时间:2024/05/16 06:30
因为项目需要,需要用react native 来写两个app。想要借助facebook官网的demo去学习下:https://github.com/fbsamples/f8app,但是在搭建中却遇到了各种奇葩问题。
1,首先遇到的是duplicate parse 这样一个报错信息。我就懵逼了。
解决方案:
{ "name": "F8v2", "version": "0.0.1", "private": true, "scripts": { "start": "babel-node ./server/server.js", "import-data": "babel-node ./scripts/import-data-from-parse.js", "update-schema": "babel-node ./server/schema/updateSchema.js", "test": "jest", "lint": "eslint ." }, "dependencies": { "art": "~0.10.1", "babel-cli": "~6.10.1", "babel-relay-plugin": "~0.9.1", "crc32": "~0.2.2", "express": "~4.14.0", "express-graphql": "~0.5.3", "graphql-relay": "~0.4.2", "moment": "~2.13.0", "parse": "1.9.2",
将parse :改为了1.9.2。
2,紧接着给我报错,说主题有问题
/Users/liuhanlin/qiniuwork/ticket/f8app/android/app/src/main/AndroidManifest.xml:55:11-70 Error: Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:55:11-70 is also present at [com.facebook.android:facebook-android-sdk:4.18.0] AndroidManifest.xml:32:13-63 value=(@style/com_facebook_activity_theme) Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:53:7-56:46 to override:app:processDebugManifest FAILED
找到那个xml
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" />
解决方法:
直接干掉那个
android:theme="@android:style/Theme.Translucent.NoTitleBar"
哪一行就可以了
3,后来终于能运行了,结果呢gmc是google的api,我权限登录不要用。
直接报错
java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.facebook.f8-1/base.apk) at com.google.android.gms.iid.zzd.zzdL(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.InstanceID.zza(Unknown Source) at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source) at com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService.onHandleIntent(RNPushNotificationRegistrationService.java:20) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.os.HandlerThread.run(HandlerThread.java:61)
各方面求证,
I finally solved this issue by doing the following changescomment out those lines in F8App.jsrender: function() {// if (!this.props.isLoggedIn) {// return ;// }return ();},});please make sure that you remove PushNotificationController in that codedo the following changes in setup.jsrender() {// if (this.state.isLoading) {// return null;// }return ();so this will load directly your main screen showing schedules and navigation drawer
就这样啦。继续写代码。
0 0
- Facebook f8app 环境搭建以及问题处理
- 搭建ReactNative开源应用f8app环境与踩坑
- facebook Infer环境搭建
- Facebook/atc环境搭建总结
- Facebook/atc 环境搭建总结
- Facebook F8App-ReactNative项目源码分析5-iOS篇
- windows2012 + wamp 环境搭建及问题处理
- Openwrt-Chaos_Calmer搭建编译环境问题处理
- MultiNET环境搭建中Cython问题处理
- Linux环境下ELK环境搭建,以及碰到的问题
- FaceBook/infer-linux下源码环境搭建
- FaceBook/atc 环境搭建的总结
- Android 环境搭建,Helloworld以及常见错误处理,最新版哦
- Hadoop环境搭建过程中的的问题以及解决方案
- ubuntu16.04搭建LAMP环境以及遇到的问题
- 搭建mysql编译环境以及遇到的问题
- Spring4+Hibernate5开发环境搭建过程以及遇到的问题
- Qt5.7 + VS2015 环境搭建以及后续问题总结
- Android 项目使用Lambda表达式
- webdriver-webelment接口方法
- ubuntu14.04 2017年1月Samba服务无法访问 网络名不再可用的问题
- nodejs是什么?为什么要学?有什么优缺点?
- 两种自动创建所需要的对象快捷键(myeclipse)
- Facebook f8app 环境搭建以及问题处理
- sbt编译出现(*:ssExtractDependencies) java.lang.IllegalStateException
- OAuth2.0简介-tencent
- NGUI之RenderQueue
- 欢迎使用CSDN-markdown编辑器
- 完美解决Android的WebView加载失败(404,500),显示的自定义视图
- 你真的了解try{ return }finally{}中的return?
- android编译多个可以一起安装的包
- 分布式计算forkJoin模拟