V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yantianqi
V2EX  ›  程序员

react-native run-android 启动报错

  •  
  •   yantianqi · 2018-05-27 15:18:37 +08:00 · 1712 次点击
    这是一个创建于 2374 天前的主题,其中的信息可能已经有所发展或是发生改变。
    nzipping /Users/WangYaqi/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1-all.zip to /Users/WangYaqi/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv
    Exception in thread "main" java.lang.IllegalArgumentException: MALFORMED
    	at java.util.zip.ZipCoder.toString(ZipCoder.java:58)
    	at java.util.zip.ZipFile.getZipEntry(ZipFile.java:566)
    	at java.util.zip.ZipFile.access$900(ZipFile.java:60)
    	at java.util.zip.ZipFile$ZipEntryIterator.next(ZipFile.java:524)
    	at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:499)
    	at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:480)
    	at org.gradle.wrapper.Install.unzip(Install.java:165)
    	at org.gradle.wrapper.Install.access$500(Install.java:26)
    	at org.gradle.wrapper.Install$1.call(Install.java:69)
    	at org.gradle.wrapper.Install$1.call(Install.java:46)
    	at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    	at org.gradle.wrapper.Install.createDist(Install.java:46)
    	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
    	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    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/getting-started.html
    
    3 条回复    2018-05-27 18:32:20 +08:00
    lovefantasy
        1
    lovefantasy  
       2018-05-27 15:35:40 +08:00 via Android
    正宗伸手党
    yantianqi
        2
    yantianqi  
    OP
       2018-05-27 15:45:16 +08:00
    按照网上的办法,将`/Users/WangYaqi/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1-all.zip`这个删掉,从网上重新下载,都不可以,还是报这个错。
    vjnjc
        3
    vjnjc  
       2018-05-27 18:32:20 +08:00 via Android
    和 react 没关系吧,估计你的 gradle wrapper 没下完整,解决办法是用 local gradle,或者清空 再下一遍
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5942 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:49 · PVG 09:49 · LAX 17:49 · JFK 20:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.