我尝试更新 payfort ,但仍然相同 调用此函数后。崩溃了
FortSdk.getInstance().registerCallback(PayFortSdkSample.this, fortrequest, FortSdk.ENVIRONMENT.PRODUCTION, 5, fortCallback, true, new FortInterfaces.OnTnxProcessed() {
@Override
public void onCancel(Map<String, Object> map, Map<String, Object> map1) {
finish();
Toast.makeText(PayFortSdkSample.this, map1.get("response_message").toString(), Toast.LENGTH_SHORT).show();
}
@Override
public void onSuccess(Map<String, Object> map, Map<String, Object> map1) {
try {
showPage(map1);
} catch (IOException e) {
e.printStackTrace();
}
finish();
Toast.makeText(PayFortSdkSample.this, map1.get("response_message").toString(), Toast.LENGTH_SHORT).show();
}
@Override
public void onFailure(Map<String, Object> map, Map<String, Object> map1) {
finish();
Toast.makeText(PayFortSdkSample.this, map1.get("response_message").toString(), Toast.LENGTH_SHORT).show();
}
});
错误LogCat:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ae.mazadat.onlineauctionapp, PID: 10287
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/codec/binary/Base64;
at com.payfort.sdk.android.dependancies.security.aes.AESCipher.getDecryptedMessage(AESCipher.java:117)
at com.payfort.sdk.android.dependancies.security.aes.AESCipherManager.decryptMsg(AESCipherManager.java:35)
at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:153)
at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:104)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.codec.binary.Base64" on path: DexPathList[[zip file "/data/app/ae.mazadat.onlineauctionapp-EGhuwTV5a2SRnsmbMWhx1g==/base.apk"],nativeLibraryDirectories=[/data/app/ae.mazadat.onlineauctionapp-EGhuwTV5a2SRnsmbMWhx1g==/lib/x86, /data/app/ae.mazadat.onlineauctionapp-EGhuwTV5a2SRnsmbMWhx1g==/base.apk!/lib/x86, /system/lib, /system/product/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.payfort.sdk.android.dependancies.security.aes.AESCipher.getDecryptedMessage(AESCipher.java:117)
at com.payfort.sdk.android.dependancies.security.aes.AESCipherManager.decryptMsg(AESCipherManager.java:35)
at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:153)
at com.payfort.fort.android.sdk.activities.InitSecureConnectionActivity$Handshake.onPostExecute(InitSecureConnectionActivity.java:104)
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
答案 0 :(得分:1)
实现'commons-codec:commons-codec:1.13'
minifyEnabled false