解决 ninja: build stopped: subcommand failed.

编译android7.0出现的错误:

ninja: build stopped: subcommand failed.

 

解决方法:

$ vi prebuilts/sdk/tools/jack-admin
1.找到如下语句:
JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR $LAUNCHER_NAME"
2.将上述语句修改为:
JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096m -cp $LAUNCHER_JAR $LAUNCHER_NAME"

主要是添加了-Xmx4096m参数,接下来在源码目录下执行如下命令重启jack-admin服务:

$ ./prebuilts/sdk/tools/jack-admin stop-server 
$ ./prebuilts/sdk/tools/jack-admin start-server

你可能感兴趣的:(android)