日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

react native笔记-个人记录-初始化工程遇到的问题

發布時間:2024/9/27 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 react native笔记-个人记录-初始化工程遇到的问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

使用Expo工具

在mac上安裝expo,如果是權限問題可以參考以下解決方法
https://blog.csdn.net/testcs_dn/article/details/78869419
https://jingyan.baidu.com/article/9c69d48ff88b3813c9024e9d.html

這是第二條鏈接的說明:對于Mac OS X 10.11 El Capitan用戶,由于系統啟用了SIP(System Integrity Protection), 導致root用戶也 沒有權限修改/usr/bin目錄。按如下方式可恢復權限。
屏蔽方法:重啟Mac,按住command+R,進入recovery模式。選擇打開Utilities下的終端,輸入:csrutil disable并回車,然后正常重啟Mac即可。

報錯: react native fsevents unavailable (this watcher can only be used on Darwin)

解決的辦法參考鏈接
npm r -g watchman
brew install watchman
注意:這里我使用npm install watchman還是有問題的,但是換成brew安裝后沒有問題

react-native run-ios報錯

Could not find iPhone 6 simulator參考鏈接

Command+shift+.可以顯示/隱藏以"."開頭的文件或者文件夾

解決 React-Native mac 運行報錯 error Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

地址,如果按照以上的還有問題使用sudo跑下https://www.cnblogs.com/stevexu/archive/2019/04/21/10745769.html

如果顯示像下面圖片一樣,但是模擬器沒有安裝程序,可能需要kill一下進程,下面的鏈接很詳細的說明了各種情況

react-native run-ios遇到的問題說明:https://juejin.im/post/5ca2e560e51d456d3550dd5c

解決node.js - Node already installed, it’s just not linked

解決鏈接:http://www.itkeyword.com/doc/7125537006697543345/node-already-installed-its-just-not-linked

解決升級到Xcode10,react native項目運行報錯問題

我遇到的錯誤是下面這個或者沒有config.f的,**

這個鏈接很有用**

錯誤一:Xcode 10: Build input file double-conversion cannot be found error: Build input file cannot be found: '../node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc' configure: error: in `../node_modules/react-native/third-party/glog-0.3.4'

解決鏈接:https://blog.csdn.net/chensenp/article/details/83543724

完美解決:"library not found for - "

該文章提供了很多的解決方案:https://blog.csdn.net/liujia216/article/details/53112709
我也遇到了該問題,但是項目的這個庫是別人封裝的,所以我暫時是把該庫移除了

React Native 日常報錯 ‘config.h’ file not found

解決鏈接:https://blog.csdn.net/qq_28978893/article/details/78720488

修改模擬器

react-native run-ios --simulator "iPhone X" //iPhone X是需要使用的模擬器

真機調試鏈接

真機調試查看連接的設備

adb devices

注意:需要確保你的電腦和手機設備在同一個Wi-Fi環境下,要不然我的會出現閃退
真機調試修改和查看

把就項目放到android studio報錯

Error:(24, 0) Could not find method implementation() for arguments [directory ‘libs’] on object of t

這種方式會有警告,告訴你compile過時了,你可以選擇升級gradle,解決鏈接

Android Studio 報錯:Could not find com.android.support:appcompat-v7:28.0.0-beta01.

加上google(),解決鏈接

AManifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).Suggestion: add ‘tools:replace="android:appComponentFactory"’ to element at AndroidManifest.xml:5:5-20:19 to override.

解決鏈接
添加tools

android studio 歷史版本下載地址

歷史版本下載地址

android studio mac完全卸載

https://blog.csdn.net/elonspace/article/details/51800949

gradle各個版本下載

http://services.gradle.org/distributions/

Lint found fatal errors while assembling a release target. 問題的解決方案

https://www.jianshu.com/p/9a3d4dddfcb2

Android Studio編譯報Couldn’t follow symbolic link錯誤

Could not list contents of '/Users/sunrifa/sendiWork/special_form_app_react_v2/node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link.

https://www.jianshu.com/p/11a304b670e5

Error: EACCES: permission denied, mkdir 類的問題

https://stackoverflow.com/questions/49679808/error-eacces-permission-denied-mkdir-usr-local-lib-node-modules-node-sass-b

找不到資源,可能需要統一版本依賴

Android resource linking failed error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v26/values-v26.xml:15: error: style attribute ‘android:attr/keyboardNavigationCluster’ not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontStyle not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/font not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontWeight not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/fontVariationSettings not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2637: error: resource android:attr/ttcIndex not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/startX not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/startY not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/endX not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2689: error: resource android:attr/endY not found. /Users/sunrifa/sendiWork/dr_reborn_app_react/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2690: error: resource android:attr/offset not found. error: failed linking references.

dependencies {compile fileTree(dir: 'libs', include: ['*.jar'])testCompile 'junit:junit:4.12'compile 'com.android.support:appcompat-v7:23.1.1'compile 'com.facebook.react:react-native:0.54.2'compile 'com.google.android.gms:play-services-gcm:11.0.4'compile 'me.leolin:ShortcutBadger:1.1.8@aar' }

修改上面的三個值,保持依賴版本統一

Cannot add task ‘wrapper’ as a task with that name already exists

https://stackoverflow.com/questions/53709282/cannot-add-task-wrapper-as-a-task-with-that-name-already-exists

react-native-keychain: 錯誤: 找不到符號 符號: 類 StrongBoxUnavailableException

重新裝下 yarn add react-native-keychain@3.0.0,裝后打開報錯的文件,發現代碼少了報錯的代碼,不知是否是之前開發添加的

Invoke-customs are only supported starting with Android O (–min-api 26)

https://www.jianshu.com/p/434928537a90

React Native version mismatch 錯誤

https://blog.csdn.net/awy1988/article/details/80336913

有可能是你在跑兩個react-native不同的版本時也會有這個問題

特批項目

升級gradle為3.4.1
重新安裝react-native-keychain,解決找不到類的問題
升級video為4.1.0
修改react-native-device-info的依賴包中的play-services-gcm的版本為15.0.1

react-native run-ios命令失敗(PCH問題),但是在xcode中構建成功

http://www.voidcn.com/article/p-owrbmtsz-btr.html
把項目根目錄下的ios/build目錄刪除,重新構建

Error: Duplicate resources

https://stackoverflow.com/questions/47084810/react-native-android-duplicate-file-error-when-generating-apk/49589616#49589616
需要修改react-native/react.gradle,暫時使用了該解決方案,需要修改node_modules里的模塊不好

個人證書打包ios教程

https://www.jianshu.com/p/924e2a0d2236
本人沒試過,記錄下,有需要再用

調試react-native跨域問題

在chrome商店下載擴展 Allow-Control-Allow-Origin: *

mysql錯誤:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

解決鏈接

有時react-native編譯ios會出現一些問題,一般處理是刪除項目下ios的build目錄、關閉終端和模擬器重新跑、還有這個地址

鏈接器命令失敗,退出代碼1(使用-v查看調用)在xcode 10和ld:找不到-lFirebaseCore庫

https://www.soinside.com/question/U6dwRm6i5m89d2BABGJ7fL

如果沒有手動的react-native軟件包 #18472, iOS main.jsbundle將不會自動創建或更新

https://translate.google.com/translate?hl=zh-CN&sl=en&u=https://github.com/facebook/react-native/issues/18472&prev=search

總結

以上是生活随笔為你收集整理的react native笔记-个人记录-初始化工程遇到的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。