Android 7.0编译错误

错误:
[  0% 43/19107] build out/target/product/angler/gen/EXECUTABLES/iw_intermediates/version.c

FAILED: /bin/bash -c "external/iw/version.sh out/target/product/angler/gen/EXECUTABLES/iw_intermediates/version.c"
fatal: 没有发现名称,无法描述任何东西。
[  0% 43/19107] target  C++: libart <= art/runtime/interpreter/interpreter_switch_impl.cc
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] 错误 1


#### make failed to build some targets (39 seconds) ####


解决:

vi external/iw/version.sh

可以看到如下:

#!/bin/sh


VERSION="4.1"
OUT="$1"


if [ -d .Git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
git update-index --refresh --unmerged > /dev/null
descr=$(git describe --match=v*)


# on git builds check that the version number above
# is correct...
[ "${descr%%-*}" = "v$VERSION" ] || exit 2


v="${descr#v}"
if git diff-index --name-only HEAD | read dummy ; then
v="$v"-dirty
fi
else
v="$VERSION"
fi


echo '#include "iw.h"' > "$OUT"
echo "const char iw_version[] = \"$v\";" >> "$OUT"


为了让这个脚本不走[ -d .git ]分支改成如下:


#!/bin/sh


VERSION="4.1"
OUT="$1"


#if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null` && [$VERSION != "4.1"]; then

git update-index --refresh --unmerged > /dev/null
descr=$(git describe --match=v*)


# on git builds check that the version number above
# is correct...
[ "${descr%%-*}" = "v$VERSION" ] || exit 2


v="${descr#v}"
if git diff-index --name-only HEAD | read dummy ; then
v="$v"-dirty
fi
else
v="$VERSION"
fi


echo '#include "iw.h"' > "$OUT"
echo "const char iw_version[] = \"$v\";" >> "$OUT"

阅读更多
个人分类: android
上一篇android4.4中自动更新时间机制
下一篇Android之分屏模式解析(下)
想对作者说点什么? 我来说一句

mtk android 编译常见错误

2012年05月04日 38KB 下载

没有更多推荐了,返回首页

关闭
关闭