开发者

Android, proguard and paypal

Using progua开发者_开发知识库rd the paypal classes are not found

ERROR/AndroidRuntime(3200): Caused by: java.lang.NoClassDefFoundError: com.paypal.android.MEP.PayPal

I tried to add -libraryjars PATH_PAYPAL_LIB_JAR but it seems to change nothing, same error. I tried to add -keepclass com.paypal.* same result

Can you provide some helps ?


You should make sure the paypal jar is in the libs directory of your project. ProGuard will then process it and include it in the output jar.

With the -libraryjars option, ProGuard will read it, but not include it in the output jar, so you get a NoClassDefFoundError. See the ProGuard manual.


I had the same problem, I solved the problem this way :

Replace in your manifest.xml

<service android:name="com.paypal.android.sdk.payments.PayPalService" android:exported="false" />

By

<service android:name="com.paypal.android.sdk.payments.PayPalService"/>

I hope this can help other people :)


I found the solution. The jar file was in my libs folder (or other :)) but I generate the application in command line and I use incorrectly the apkbuilder tool.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜