【问题标题】:Error on compile to Andriod when apply certificate申请证书时编译到 Android 时出错
【发布时间】:2021-01-28 16:33:45
【问题描述】:

我的应用程序编译为 android ok。

当我创建 android 证书并将其发送到代号编译器时,它不会编译。

我尝试使用keytool生成证书并尝试使用代号one上的助手,结果相似。

如果我删除密钥库文件并重新发送到仪表板,则应用程序编译正常。

这是日志错误


    Note: there were 3 references to unknown classes.
      You should check your configuration for typos.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
    Note: there were 1 references to unknown class members.
      You should check your configuration for typos.
    Note: there were 22 unkept descriptor classes in kept class members.
      You should consider explicitly keeping the mentioned classes
      (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
    Note: there were 17 unresolved dynamic references to classes or interfaces.
      You should check if you need to specify additional program jars.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
    Note: there were 5 class casts of dynamically created class instances.
      You might consider explicitly keeping the mentioned classes and/or
      their implementations (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
    Warning: there were 25 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
    Warning: there were 2 unresolved references to program class members.
         Your input classes appear to be inconsistent.
         You may need to recompile the code.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
        Warning: Exception while processing task java.io.IOException: Please correct the above warnings 
  first.
    :transformClassesAndResourcesWithProguardForRelease FAILED
    :transformClassesAndResourcesWithProguardForRelease (Thread[Task worker for ':',5,main]) completed. Took 3.21 secs.
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'.
    > Job failed, see logs for details
    
    * Try:
    Run with --debug option to get more log output. Run with --scan to get full insights.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task 
   ':transformClassesAndResourcesWithProguardForRelease'.
        at 
 

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    这与证书无关。它在证书之前的混淆阶段失败。众所周知,这些错误很难阅读,而且您似乎剪得太晚了。我需要上面的部分,其中包含有关未找到的类/方法的详细警告。

    转到错误并向上滚动一点,寻找一个熟悉的类名,旁边有一个 proguard 警告。这是导致问题的类,可能是因为缺少依赖项。如果您找不到它,只需将日志链接发布到网站聊天,我们的支持人员会为您检查。

    【讨论】:

    • 感谢 Shai,阅读这篇文章:stackoverflow.com/questions/49885112/… 我尝试了提示:android.enableProguard=false 并且编译工作正常。
    • 我再次查看日志,发现这个错误: 注意:com.appsflyer.AppsFlyerLib:找不到动态引用的类 com.android.installreferrer.api.InstallReferrerClient 注意:com.appsflyer.AppsFlyerLib:找不到动态引用的类android.os.SystemProperties 然后我检查了引用因为appflyer和cn1.lib,我们之前使用过。我删除了 jar 并使用 android.enableProguard=false 进行编译。我认为最好将 progard 用于生产环境。你同意?非常感谢。
    • 是的。对大小/性能/安全性和可移植性使用混淆非常重要,因为它可以检测到可能在其他平台上失败的问题。
    猜你喜欢
    • 2019-03-09
    • 2020-06-24
    • 2018-07-26
    • 2016-10-29
    • 2015-11-26
    • 1970-01-01
    • 2018-09-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多