python - 文件 "device/generic/goldfish/tools/mk_combined_img.py",第 48 行打印 "' %s' 无法转换为 int"%(第 [2] 行)

标签 python android android-source archlinux android-automotive

使用 this guide 在 Arch Linux 上编译 Android Automotive OS 时在编译的最后阶段你可能会得到这样的错误:

FAILED: out/target/product/generic_x86_64/system-qemu.img
/bin/bash -c "(export SGDISK=out/host/linux-x86/bin/sgdisk SIMG2IMG=out/host/linux-x86/bin/simg2img;      device/generic/goldfish/tools/mk_combined_img.py -i out/target/product/generic_x86_64/system-qemu-config.txt -o out/target/product/generic_x86_64/system-qemu.img)"
  File "device/generic/goldfish/tools/mk_combined_img.py", line 48
    print "'%s' cannot be converted to int" % (line[2])
          ^
SyntaxError: invalid syntax

最佳答案

如果在 Arch linux 上编译 AOSP 时出现此错误,您需要转到文件 /android/device/generic/goldfish/tools/mk_combined_img.py 并更改第一行: #!/usr/bin/python#!/usr/bin/python2

现在应该可以正常编译了...

关于python - 文件 "device/generic/goldfish/tools/mk_combined_img.py",第 48 行打印 "' %s' 无法转换为 int"%(第 [2] 行),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64230597/

相关文章:

python - 解析大型 M3U 文件时遇到问题

Android 放大并以 map 中的自定义标记为中心

android - 如何在Kindle Fire上安装.apk文件

android - 如何使用我自己的自定义启动动画编译 AOSP 项目?

python - 使用 Pygame 显示文本的透明度问题

python - 两个 3dim 矩阵的 numpy einsum 的 Theano 版本

python - 抑制 PyDev 中无法访问的错误?

android - 连接Android与数据库

android - Nexus 7 刷完 AOSP build 后卡在 google 的 logo 上

android - adb root 工作 Runtime.GetRuntime().Exec ("su");才不是