簡體   English   中英

運行本地應用程序時出錯

[英]error while running react native app

我在Windows中的react native android中運行我的第一個應用程序時正在安裝react native。 我出錯了

無法確定任務':app:preDebugBuild'的依賴關系。 >無法解決配置':app:debugRuntimeClasspath'的所有任務依賴關系。 >無法解析項目:react-native-default-preference。 必填項:project:app>無法找到項目:react-native-default-preference的匹配配置:消耗品配置都沒有屬性。 在本地反應

您應該清除緩存,然后重試

RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && 
npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 -  watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && 
rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm 
install && npm start -- --reset-cache

npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && 
npm cache verify && npm install && npm start -- --reset-cache

Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del 
node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache

答案來自https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM