Tag: native base

无法安装react-native Nativebase:执行任务失败:app:compileDebugJavaWithJavac'

尝试在Windows 10上为我的React Native项目安装NativeBase时遇到以下问题 react-native init RNapp cd RNapp npm install native-base –save react-native link react-native-vector-icons 编辑android/app/build.gradle并将以下内容添加到文件末尾: apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" 运行echo %JAVA_HOME%会给出C:\Program Files\Java\jdk1.8.0_111 现在当我跑步 react-native run-android 生成失败,出现以下错误。 有没有解决这个问题? C:\Users\y\RNapp\android\app\src\main\java\com\rnapp\MainApplication.java:6: error: cannot find s mbol import com.facebook.react.ReactApplication; ^ symbol: class ReactApplication location: package com.facebook.react C:\Users\y\RNapp\android\app\src\main\java\com\rnapp\MainApplication.java:9: error: cannot find s mbol import com.facebook.react.ReactNativeHost; ^ symbol: class ReactNativeHost location: […]

意外的令牌导入native-base-shoutem-theme / index.js:1可能是native-base / react-native

)我有一个很大的问题,我花了整整一天的时间来解决这个问题,并在几个软件包的依赖关系之间find了共识 我在运行testing时遇到问题: Users/P/Projects/react-native/node_modules/native-base-shoutem-theme/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import connectStyle from './src/connectStyle'; ^^^^^^ SyntaxError: Unexpected token import at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17) at Object.<anonymous> (node_modules/native-base/dist/src/index.js:1:1133) at Object.<anonymous> (app/index.js:18:96) 现在我search反应的好版本,react-native,react-dom,native-base和react-test-renderer。 我尝试了新的和旧的,但有时我有这个错误,有时其他人..我决定修复这一个,因为它的一些最新版本的问题。 我的NPM: “babel-cli”:“6.24.1”,“react-native”:“0.44.0”,“native-base”:“2.1.2”,“react”:“16.0.0-alpha.3” “react-test-renderer”:“16.0.0-alpha.3” 节点版本7.7.2 npm版本4.1.2 如果你有其他WORKING的可选版本,请通过我这些或帮助解决这个错误;)我认为我将能够解决它与react-native init比较,有testing正在为我工​​作,但不是在我的项目..我不知道什么是错的: 我知道这有点棘手,但请帮助我;) 编辑:在版本react-native 0.45.0我有这个错误💃 ● Test suite failed to run TypeError: Cannot read property 'ReactCurrentOwner' of undefined at Object.<anonymous> (node_modules/react-native/Libraries/Renderer/src/renderers/shared/ReactGlobalSharedState.js:18:33) at Object.<anonymous> (node_modules/react-native/Libraries/Renderer/src/renderers/shared/ReactDebugTool.js:18:1) at Object.<anonymous> (node_modules/react-native/Libraries/Renderer/src/renderers/shared/ReactInstrumentation.js:19:20) […]