没有lint标记。在通过eclipse插入我的计算机的每台设备进行调试时,paypal sdk组件工作正常。当我将项目导出为APK时,当我到达应用程序的paypal部分时,“不幸停止”。调试运行与编译的apk文件的主要区别是什么?在作为调试运行时,实时支付服务再次在项目中正常工作。没有API密钥对此项目中的SHA1差异敏感(签名的apk与调试)。
以下是我从apk中安装的应用报告中看到的一些内容:
java.lang.NoSuchMethodError: no method with name='onEdgeUpdate' signature='(Lio/card/payment/DetectionInfo;)V' in class Lio/card/payment/CardScanner;
at java.lang.Runtime.nativeLoad(Native Method)
at java.lang.Runtime.doLoad(Runtime.java:418)
at java.lang.Runtime.loadLibrary(Runtime.java:359)
at java.lang.System.loadLibrary(System.java:525)
at io.card.payment.CardScanner.<clinit>(Unknown Source)
at io.card.payment.z.c(Unknown Source)
at io.card.payment.z.a(Unknown Source)
at io.card.payment.CardIOActivity.a(Unknown Source)
at io.card.payment.CardIOActivity.a(Unknown Source)
at com.paypal.android.sdk.payments.PaymentMethodActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5133)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
在调试模式下,当我按下结帐按钮时它工作正常,但这里是logcat中的内容,也许有人可以看到:
09-11 12:43:32.932: D/dalvikvm(10630): Trying to load lib /data/app-lib/com.direction.investor.bcms-2/libcardioDecider.so 0x4219ac28
09-11 12:43:32.932: D/dalvikvm(10630): Added shared lib /data/app-lib/com.direction.investor.bcms-2/libcardioDecider.so 0x4219ac28
09-11 12:43:32.932: D/dalvikvm(10630): Trying to load lib /data/app-lib/com.direction.investor.bcms-2/libopencv_core.so 0x4219ac28
09-11 12:43:32.932: D/dalvikvm(10630): Added shared lib /data/app-lib/com.direction.investor.bcms-2/libopencv_core.so 0x4219ac28
09-11 12:43:32.942: D/dalvikvm(10630): No JNI_OnLoad found in /data/app-lib/com.direction.investor.bcms-2/libopencv_core.so 0x4219ac28, skipping init
09-11 12:43:32.942: D/dalvikvm(10630): Trying to load lib /data/app-lib/com.direction.investor.bcms-2/libopencv_imgproc.so 0x4219ac28
09-11 12:43:32.942: D/dalvikvm(10630): Added shared lib /data/app-lib/com.direction.investor.bcms-2/libopencv_imgproc.so 0x4219ac28
09-11 12:43:32.942: D/dalvikvm(10630): No JNI_OnLoad found in /data/app-lib/com.direction.investor.bcms-2/libopencv_imgproc.so 0x4219ac28, skipping init
09-11 12:43:32.942: D/dalvikvm(10630): Trying to load lib /data/app-lib/com.direction.investor.bcms-2/libcardioRecognizer.so 0x4219ac28
09-11 12:43:32.952: D/dalvikvm(10630): Added shared lib /data/app-lib/com.direction.investor.bcms-2/libcardioRecognizer.so 0x4219ac28
答案 0 :(得分:3)
根据developer.android的说法,“ProGuard工具通过删除未使用的代码并使用语义模糊的名称重命名类,字段和方法来缩小,优化和混淆代码。结果是更小的.apk文件更多难以逆向工程。“
我未能包括:
@proguard-paypal.cnf marker in the proguard-project.txt
有关android paypal sdk的未来参考,请参阅https://github.com/paypal/PayPal-Android-SDK。