Я пытаюсь протестировать приложение в режиме выпуска перед загрузкой в Google Play Store, но получаю сообщение об ошибке типа
"E / AsyncHttpRequest: необработанное происхождение исключения вызывает java.lang.ClassCastException: $ Proxy0 не может быть приведен к daaakh ".
Если кто-то столкнулся с той же проблемой и нашел решение, то дайте мне знать, спасибо.В режиме отладки он работает нормально, но в режиме выпуска я получаю сообщение об ошибке
Раньше он тоже работал в режиме выпуска, но теперь он не работает в режиме выпуска
phoneNo = phoneText.getText().toString();
System.out.println( phoneNo );
params.put( "mob_no", phoneNo );
//String debugHashKey = "Yq%2BZIxNoG%2BK";
String releaseHashKey = "hFmVMD4X1DR";
System.out.println( releaseHashKey );
params.put( "uniqueKey", releaseHashKey );
try {
asyncHttpClient.post( mob_validate, params, new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
try {
System.out.println( "onSuccess" );
status = response.getString( "status" );
msg = response.getString( "msg" );
Toast.makeText( getApplicationContext(), msg, Toast.LENGTH_SHORT ).show();
if (status.equals( "success" )) {
Intent intent = new Intent( MainActivity.this, OTPConfirmationActivity.class );
intent.putExtra( "phone_no", phoneNo );
startActivity( intent );
finish();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
//Toast.makeText( getApplicationContext(), R.string.onFailure, Toast.LENGTH_SHORT ).show();
}
@Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
super.onFailure( statusCode, headers, responseString, throwable );
}
@Override
public void onStart() {
progressBar.setVisibility( View.VISIBLE );
}
@Override
public void onFinish() {
progressBar.setVisibility( View.INVISIBLE );
}
} );
} catch (ClassCastException e) {
e.printStackTrace();
}
/////////////////build.gradle file//////////////////////
apply plugin: 'com.android.application'
android {
signingConfigs {
release {
storeFile file('/home/eazysoft/Documents/finalKey/releaseKey.jks')
storePassword 'password'
keyAlias = 'upload'
keyPassword 'password'
}
}
compileSdkVersion 28
defaultConfig {
applicationId "com.eazysoft.lookAround"
minSdkVersion 15
targetSdkVersion 28
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
signingConfig signingConfigs.release
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
debuggable = true
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha4'
testImplementation 'junit:junit:4.13-beta-2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-identity:16.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-auth-api-phone:16.0.0'
implementation 'com.loopj.android:android-async-http:1.4.9'
}
Пожалуйста,предоставьте мне решение, которое работает с Sms Retriever API, чтобы я мог загрузить свое приложение в игровой магазин.