【发布时间】:2020-04-12 14:11:39
【问题描述】:
我尝试将 simple_game 从模板构建到 Android 并将其安装在 Android 设备上。 但是我在安装到 Android 设备时遇到了问题,尤其是 ADB 部分。
我使用手册构建于:
但是最后一步我有点麻烦。
当我将我的 Android 设备连接到 PC 时,使用命令提示符进入 simple_game 目录并运行
ADB 设备
PC 查看 Android 设备,此设备在设备列表中。我已经在 Android 设备上设置了开发者模式,安装了新的驱动程序以查看 PC 设备,设置 USB 调试并确认将此 Android 设备与 PC 一起使用。
在这之后,我运行命令
mingw32-make PLATFORM=PLATFORM_ANDROID
但是 Makefile.Android 中带有 ADB 的部分不起作用。
这是屏幕上的最后一个回声
C:\open-jdk/bin/jarsigner -keystore android.simple_game/simple_game.keystore -storepass raylib -keypass raylib -signedjar android.simple_game/bin/simple_game.signed.apk android.simple_game/bin/simple_game.unsigned.apk simple_gameKey
jar signed.
Warning:
The signer's certificate is self-signed.
C:/android-sdk/build-tools/29.0.3/zipalign -f 4 android.simple_game/bin/simple_game.signed.apk simple_game.apk
mingw32-make[3]: Leaving directory 'C:/raylib/raylib/templates/simple_game'
C:\raylib\raylib\templates\simple_game>
When I try run adb separatly, I get error
C:\RAYLIB\templates\simple_game>adb install simple_game.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Performing Streamed Install
adb: failed to install simple_game.apk: Failure [INSTALL_FAILED_INVALID_APK: Package couldn't be installed in /data/app/com.raylib.rgame-G49JemMPBwfUFp_sJK7aFQ==: Package /data/app/com.raylib.rgame-G49JemMPBwfUFp_sJK7aFQ==/base.apk code is missing]
C:\RAYLIB\templates\simple_game>
有谁知道如何解决这个问题并成功地将apk文件安装到android设备上?
谢谢
【问题讨论】:
标签: android c installation adb raylib