【问题标题】:Apksigner not signing apk on termuxApksigner 未在 termux 上签署 apk
【发布时间】:2020-11-04 16:39:30
【问题描述】:

我正在 Android 上的 termux 上编译 Mario 64,但在完成时遇到了问题。

这是正在发生的错误我有什么问题? 谢谢!

apksigner sign --cert certificate.pem --key key.pk8 build/us_pc/sm64.us.f3dex2e.apk

Exception in thread "main" java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)              
  at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:353)
  at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:83) make: *** [Makefile:887: build/us_pc/sm64.us.f3dex2e.apk] Error 1                                                
$ ls -al build/us_pc/sm64.us.f3dex2e.apk
$ cp sm64.us.f3dex2e.apk storage/emulated/Download
cp: cannot stat 'sm64.us.f3dex2e.apk': No such file or directory

【问题讨论】:

  • 我昨天遇到了同样的问题。我设法通过调用jarsigner 而不是apksigner(在zipalign 之后)找到了解决方法,如下所述:stackoverflow.com/a/40064149/1110499

标签: android super termux


【解决方案1】:

我认为这是“文件”和“文件”的基本问题!检查第一个字母以防它在某处意外大写

【讨论】:

    【解决方案2】:

    试试这个APK Signer

    然后运行apksigner [-p password] keystore input-apk output-apk 这将使用指定的密钥库(或在必要时创建一个)来创建签名的输出文件。

    【讨论】:

      猜你喜欢
      • 2021-05-13
      • 2021-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-07
      • 1970-01-01
      相关资源
      最近更新 更多