2016-07-08 50 views
0

以下是使用react-native-vectorIcons時的錯誤。我遵循https://github.com/oblador/react-native-vector-icons的說明,但在建設項目時仍然面臨錯誤。在使用react-native-vectoricons時生成失敗並出現異常

VectorIcons

這裏是MainActivity.java

protected List<ReactPackage> getPackages() { 
     return Arrays.<ReactPackage>asList(
      new MainReactPackage(), 
      new VectorIconsPackage(), 
      new MapsPackage(this) 
     ); 
    } 

這裏的代碼是settings.gradle

include ':app', ':react-native-maps' 
project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/android') 
include ':react-native-vector-icons' 
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') 

代碼有誰能夠告訴我是什麼問題?

在此先感謝。

+0

您使用哪種版本的react-native? –

+0

我正在使用react-native 0.28.0您可以檢查我的解決方案。 – atif

回答

0

請只做react-native run-android --debug一次..希望它可以幫助你。

+0

你的解決方案不起作用,但我仍然發現你可以看看我的答案。並感謝您的幫助 – atif

0

嗨錯誤是由於的build.gradle文件中的一些缺失行我固定它,一切都在這裏,現在工作正常 是失蹤

dependencies { 
    ..... 
    compile project(':react-native-vector-icons') 
} 

也是問題是我安裝react-行的1.10.3版本的原生矢量圖標,請通過

npm install --save [email protected] 

這就是你完成它更新到2.0.3。疑問和疑問,歡迎撥打

相關問題