0

プロジェクトで Google ドライブ API を使用すると述べました。デバッグ キーストアを使用して電話でプロジェクトを実行すると、すべて正常に動作します。

署名付き APK を作成しようとすると、proguard から次のエラーがスローされます

[2013-10-07 12:59:01 - My Project] Proguard returned with error code 1. See console
[2013-10-07 12:59:01 - My Project] Proguard returned with error code 1. See console
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
[2013-10-07 12:59:01 - My Project] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-10-07 12:59:01 - My Project] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project]       You should check if you need to specify additional program jars.
[2013-10-07 12:59:01 - My Project] Warning: there were 224 unresolved references to classes or interfaces.
[2013-10-07 12:59:01 - My Project]          You may need to specify additional library jars (using '-libraryjars').
[2013-10-07 12:59:01 - My Project] java.io.IOException: Please correct the above warnings first.
[2013-10-07 12:59:01 - My Project]  at proguard.Initializer.execute(Initializer.java:321)
[2013-10-07 12:59:01 - My Project]  at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-10-07 12:59:01 - My Project]  at proguard.ProGuard.execute(ProGuard.java:86)
[2013-10-07 12:59:01 - My Project]  at proguard.ProGuard.main(ProGuard.java:492)

また、proguard-project.txt に以下を追加してみました

-dontwarn org.apache.harmony.**
-dontwarn javax.activation.**

上記を追加すると、APK が作成されますが、起動時に APP がクラッシュします

誰でも私を助けてください!

4

1 に答える 1

0

Android ランタイムの一部ではないクラスを参照しています。それらを参照しているクラスを削除するか、警告を抑制したいだけの場合は、追加してみてください

-dontwarn java.awt.**,java.beans.**あなたのプロガード設定に。

ProGuard トラブルシューティング ガイドの追加情報。

于 2013-10-07T10:22:57.323 に答える