private void setupBouncyCastle() {
final Provider provider = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME);
if (provider == null) {
// Web3j will set up the provider lazily when it's first used.
return;
}
if (provider.getClass().equals(BouncyCastleProvider.class)) {
// BC with same package name, shouldn't happen in real life.
return;
}
// Android registers its own BC provider. As it might be outdated and might not include
// all needed ciphers, we substitute it with a known BC bundled in the app.
// Android's BC has its package rewritten to "com.android.org.bouncycastle" and because
// of that it's possible to have another BC implementation loaded in VM.
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);
Security.insertProviderAt(new BouncyCastleProvider(), 1);
}
Try this : Add the method below in your custom Application,and call the method in 'onCreate()'
- 위에 함수를 작성한다음에 onCreate에서 호출을 해야한다. !
'App > etc' 카테고리의 다른 글
Error PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) (0) | 2019.07.01 |
---|---|
[Android] Binary XML file line #1: Error inflating class (0) | 2019.06.25 |
안드로이드 http 통신오류 (1) | 2019.05.17 |
Exception while doing past iteration backup: Source (0) | 2019.03.25 |
Error:(1, 1) error: illegal character: '\ufeff' (0) | 2018.11.12 |