2016-04-12 95 views
2

我試圖安裝在這裏的示例應用程序:https://github.com/brentvatne/react-native-scrollable-tab-view反應,本機矢量圖標:processReleaseResources

安裝後,我嘗試運行,但出現錯誤:

:react-native-vector-icons:processReleaseResources FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':react-native-vector-icons:processReleaseResources'. 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.E 
xecException: Process 'command 'C:\Users\KJA\AppData\Local\Android\sdk\build-too 
ls\23.0.1\aapt.exe'' finished with non-zero exit value 1 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output. 

BUILD FAILED 

Total time: 23.638 secs 
Could not install the app on the device, read the error above for details. 
Make sure you have an Android emulator running or a device connected and have 
set up your Android development environment: 
https://facebook.github.io/react-native/docs/android-setup.html 

豈今得到緩解?

+0

正如錯誤信息中所建議的那樣,您應該嘗試使用'--stacktrace'或'--debug'運行它以獲取有關該問題的更精確的信息。 – mbernardeau

回答

1

裁判:https://github.com/oblador/react-native-vector-icons/issues/102

  • 我花了太多時間試圖找出這個錯誤,並且(至少對我來說),它原來是一些非常愚蠢的,並在很大程度上無關react-本機矢量圖標庫。
  • 經過數小時的A-B-A測試,我得出結論,這個庫有一些非常長的路徑名稱。
  • 這對Windows用戶真的有不利影響。
  • 如果我的項目位於:C:\Users\MyName789\Dropbox\123 Software Development -- React Native\IconExplorer,我們會得到總體失敗。
  • 如果我將該項目移至:C:\IconExplorer一切正常。

對Windows用戶的建議:運行react-native run-android時會影響許多文件。長文件名稱地址將導致許多錯誤,包括Execution failed for task ':react-native-vector-icons:processReleaseResources'就這麼說,保持文件路徑名稱儘可能短!

+0

針對Mac用戶的任何解決方案都有相同的問題? –

0

在Windows上一個能火起來註冊表編輯器,然後搜索

LongPathsEnabled 

,並將其設置爲1。

做一個重啓之後,如果問題只在長路徑名的謊言,它應該是不見了。