[英]React native maps Execution failed for task ':react-native-maps:checkDebugManifest'
[英]React-native build error: Execution failed for task ':react-native-maps:prepareComAndroidSupportAppcompatV72301Library'. > Could not expand ZIP
我在Windows 10系統上創建了一個新的react-native
項目,安裝了react-native-maps
軟件包和rnpm link
,但是在啟動該項目時出現“構建失敗”錯誤。
是什么導致此問題?
react-native init myapp
npm install react-native-maps --save
rnpm link
react-native run-android
版本號
react-native-cli: 1.3.0
react-native: 0.39.1
node: v7.2.1
npm: 3.10.10
錯誤
JS server already running.
Running C:\Users\y\AppData\Local\Android\Sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:react-native-maps:compileLint
:react-native-maps:copyReleaseLint UP-TO-DATE
:react-native-maps:preBuild UP-TO-DATE
:react-native-maps:preReleaseBuild UP-TO-DATE
:react-native-maps:checkReleaseManifest
:react-native-maps:preDebugAndroidTestBuild UP-TO-DATE
:react-native-maps:preDebugBuild UP-TO-DATE
:react-native-maps:preDebugUnitTestBuild UP-TO-DATE
:react-native-maps:preReleaseUnitTestBuild UP-TO-DATE
:react-native-maps:prepareComAndroidSupportAppcompatV72301Library FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-maps:prepareComAndroidSupportAppcompatV72301Library'.
> Could not expand ZIP 'C:\Users\y\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support\appcompat-v
7\23.0.1\appcompat-v7-23.0.1.aar'.
* 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: 7.247 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
(node:8824) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read prop
erty 'message' of undefined
(node:8824) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are
not handled will terminate the Node.js process with a non-zero exit code.
我有這個問題。 嘗試在Android Studio中打開您的項目。 在右上角有一些通知,您需要更新Android構建工具和平台工具。
我經常遇到這樣的問題,這是Windows問題。 據我了解,這是因為展開zip需要太多時間而構建器失敗。 通過將項目文件夾移動到ssd並將項目文件夾添加到我的防病毒軟件的例外中,我已將此類警告最小化
只是越來越多地執行“ react-native run-android”,它將在一段時間內完成
您需要根據此問題進行以下操作
cd android && gradlew clean && cd .. && react-native run-android
在窗戶上
cd android
gradlew clean
cd ..
react-native run-android
要么
cd android && gradlew clean && cd .. && react-native run-android
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.