Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CMD 对可执行命令有长度限制,在 javac 参数太长的时候会出错 #382

Closed
Linda0509 opened this issue Dec 1, 2016 · 19 comments

Comments

@Linda0509
Copy link

#208 同样的问题
修改了java路径和环境变量也报同样的错误

@lomanyong
Copy link
Member

lomanyong commented Dec 1, 2016

@ChinaLinda 麻烦不要描述现象...最好能够给完整的日志...

@Linda0509
Copy link
Author

Linda0509 commented Dec 1, 2016

增量编译的时候:
[ERROR] --------------------------------------------------------
[ERROR] Freeline ERROR
[ERROR] --------------------------------------------------------
Traceback (most recent call last):
File "C:\live\freeline_core\android_tools.py", line 329, in execute
self._command.execute()
File "C:\live\freeline_core\gradle_inc_build.py", line 186, in execute
map(lambda command: command.execute(), self.command_list)
File "C:\live\freeline_core\gradle_inc_build.py", line 186, in
map(lambda command: command.execute(), self.command_list)
File "C:\live\freeline_core\gradle_inc_build.py", line 225, in execute
self._invoker.run_javac_task()
File "C:\live\freeline_core\gradle_inc_build.py", line 617, in run_javac_task
output, err, code = cexec(javacargs, callback=None)
File "C:\live\freeline_core\utils.py", line 28, in cexec
p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env, cwd=cwd)
File "C:\Python27\lib\subprocess.py", line 711, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 87]

[ERROR] --------------------------------------------------------
[ERROR] incremental build task failed.
[ERROR] --------------------------------------------------------
[DEBUG] Prepare tasks time: 0.3s
[DEBUG] Task engine running time: 0.2s
[DEBUG] Total time: 0.5s
[DEBUG] --------------------------------------------------------

@lomanyong
Copy link
Member

@ChinaLinda javac 的命令太长了...超过 cmd 的限制了...我看下解决方案...

@lomanyong
Copy link
Member

@ChinaLinda 下个版本修复这个问题。

@Linda0509
Copy link
Author

好的 谢谢

@lomanyong lomanyong changed the title WindowsError: [Error 87] Windows CMD 对可执行命令有长度限制,在 javac 参数太长的时候会出错 Dec 1, 2016
@lomanyong
Copy link
Member

@ChinaLinda hi,执行一下这个命令gradlew initFreeline -PfreelineVersion=0.8.2.1612011823

执行python freeline.py -v,确认一下 python 版本更新为 0.8.2.1612011823 了。

然后重新编译看看是否可以解决你的问题。

@Linda0509
Copy link
Author

Linda0509 commented Dec 2, 2016

出现这个错误
C:\xxx>python freeline.py -v
ERROR
Project description file not found:
-> C:\xxx\freeline_project_description.json

To solve this error, please execute the command below:

  • Windows[CMD]: gradlew checkBeforeCleanBuild
  • Linux/Mac: ./gradlew checkBeforeCleanBuild

Then, this problem will be solved.
按照提示gradlew checkBeforeCleanBuild 没有解决

@lomanyong
Copy link
Member

@ChinaLinda 我的锅,把classpath: "com.antfortune.freeline:gradle:0.8.2"升级一下版本com.antfortune.freeline:gradle:0.8.2.1611302135,就可以解决这个问题了...

@Linda0509
Copy link
Author

Linda0509 commented Dec 2, 2016

增量可以编译通过了 可是activity没有重新拉起 而且我重开app也没有相应的代码变动
no incremental dexes in C:xxx\app\build\freeline\freeline-dexes

@lomanyong
Copy link
Member

@ChinaLinda 可以贴下日志吗?需要确认一下是否有生成新的 dex.. 我这里在 Mac 环境下测试的..

@lomanyong
Copy link
Member

@ChinaLinda 有这句日志no incremental dexes表示刚才的编译没有生成新的dex,需要把那次编译的日志发出来看下..

@lomanyong
Copy link
Member

@ChinaLinda 我看你上面发的日志有编译成功呀...也sync到设备过去了..

@Linda0509
Copy link
Author

现在每一次都是编译成功的 上面那个日志虽然显示sync到设备但是我设备上的内容还是没有更改 也没有Activity被重新拉起的过程

@lomanyong
Copy link
Member

@ChinaLinda 可以看下 app logcat 的日志,过滤 freeline 相关的,不要分进程...然后截出来看下...

@lomanyong
Copy link
Member

@ChinaLinda 这部分日志是增量时的日志吗?没有kill process之类的句子?这部分日志后面没有了吗?

@Linda0509
Copy link
Author

是增量的 后面没有了

@lomanyong
Copy link
Member

@ChinaLinda 有这句日志:Background execution not allowed: receiving ...,FreelineReceiver 没有收到 intent,所以没重启,具体的原因我找找看。

@lomanyong
Copy link
Member

@ChinaLinda 你用的是哪个系统的?版本多少?换个手机是否可以成功?

@Linda0509
Copy link
Author

android7.0的 感觉我知道问题在哪了 估计是我安装了黑域可能有冲突 我把黑域里对app的阻止关掉就可以了 非常感谢 谢谢编译贼快!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants