0

i am having big problems with my release version of my app. (https://play.google.com/store/apps/details?id=com.conta.ftof try to download it to help me if you can) In the debug version everything works, but in the relase version as soon as I authenticate firebase with a phone number or just authenticate and click on the recycler view button the app crashes ... I recently added the sha keys -1 and sha-256 to the firebase project and I added the new json file because the authentication was not working, now the authentication works great but as soon as you are authenticated, as I have already said, the app goes into crush. I don't know if the fault is google ads, which I added 1 week ago in contactsactivity ... The strange thing is that the debug version is fully functional ... I leave you the code...

enter image description here

LogCat of crush

 --------- beginning of crash
2020-10-16 19:11:58.221 22176-22176/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.conta.ftof, PID: 22176
    c.e.c.m.d: No properties to serialize found on class c.b.a.d
        at c.e.c.m.x.z0.o.a$a.<init>(:11)
        at c.e.c.m.x.z0.o.a.e(Unknown Source:12)
        at c.e.c.m.x.z0.o.a.b(:4)
        at c.c.a.b.b.a(:5)
        at c.c.a.a.a.a(:3)
        at com.firebase.ui.database.FirebaseRecyclerAdapter.p(:2)
        at androidx.recyclerview.widget.RecyclerView$g.q(Unknown Source:0)
        at androidx.recyclerview.widget.RecyclerView$v.k(:80)
        at androidx.recyclerview.widget.LinearLayoutManager$c.c(:3)
        at androidx.recyclerview.widget.LinearLayoutManager.t1(Unknown Source:0)
        at androidx.recyclerview.widget.LinearLayoutManager.e1(:2)
        at androidx.recyclerview.widget.LinearLayoutManager.s0(:22)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(Unknown Source:38)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayout(Unknown Source:37)
        at androidx.recyclerview.widget.RecyclerView.onLayout(Unknown Source:5)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1842)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1686)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1595)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1842)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1686)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1595)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at com.android.internal.policy.DecorView.onLayout(DecorView.java:902)
        at android.view.View.layout(View.java:20948)
        at android.view.ViewGroup.layout(ViewGroup.java:6279)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3037)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2545)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1636)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7946)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1092)
        at android.view.Choreographer.doCallbacks(Choreographer.java:893)
        at android.view.Choreographer.doFrame(Choreographer.java:812)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1078)
        at android.os.Handler.handleCallback(Handler.java:907)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:216)
        at android.app.ActivityThread.main(ActivityThread.java:7625)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
2020-10-16 19:11:58.227 1272-2391/? E/ActivityManager: The same pid with last one, do not add dropbox and clear mLastCrashedPid. mLastAppCrashedPid==22176

ContactsActivity:

//[...import some libraries...]
        public class ContactsActivity extends AppCompatActivity {
    BottomNavigationView navView;
    RecyclerView myContactsList;
    ImageView findPeopleBtn;
    
        private DatabaseReference contactsRef, usersRef;
        private FirebaseAuth mAuth;
        private String currentUserId;
    
        private String userName = "", profileImage="";
        private String calledBy = "";
        private AdView mAdView;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_contacts);
            //ads
            MobileAds.initialize(this, new OnInitializationCompleteListener() {
                @Override
                public void onInitializationComplete(InitializationStatus initializationStatus) {
    
                }
            });
            //ads
            AdView adView = new AdView(this);
    
            adView.setAdSize(AdSize.BANNER);
            adView.setAdUnitId("ca-app-pub-3400243939195187/7974459299");
            mAdView = findViewById(R.id.adView);
            AdRequest adRequest = new AdRequest.Builder().build();
            mAdView.loadAd(adRequest);
    
            mAuth = FirebaseAuth.getInstance();
            currentUserId = mAuth.getCurrentUser().getUid();
            contactsRef = FirebaseDatabase.getInstance().getReference().child("Contacts");
            usersRef = FirebaseDatabase.getInstance().getReference().child("Users");
    
    
            navView = findViewById(R.id.nav_view);
            navView.setOnNavigationItemSelectedListener(navigationItemSelectedListener);
    
            findPeopleBtn = findViewById(R.id.find_people_btn);
            myContactsList = findViewById(R.id.contact_list);
            myContactsList.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
    
            findPeopleBtn.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
    
                    Intent findpeopleIntent = new Intent(ContactsActivity.this, FindPeopleActivity.class);
                    startActivity(findpeopleIntent);
    
                }
            });
    
    
    
    
        }
    
        private BottomNavigationView.OnNavigationItemSelectedListener navigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
    
                switch (menuItem.getItemId()){
    
                    case R.id.navigation_home:
                        Intent mainIntent = new Intent(ContactsActivity.this, ContactsActivity.class);
                        startActivity(mainIntent);
                        break;
    
                    case R.id.navigation_settings:
                        Intent settingsIntent = new Intent(ContactsActivity.this,SettingsActivity.class);
                        startActivity(settingsIntent);
                        break;
    
                    case R.id.navigation_notifications:
                        Intent notificationsIntent = new Intent(ContactsActivity.this,NotificationsActivity.class);
                        startActivity(notificationsIntent);
                        break;
    
                    case R.id.navigation_logout:
                        FirebaseAuth.getInstance().signOut();
                        Intent logoutIntent = new Intent(ContactsActivity.this,RegistrationActivity.class);
                        startActivity(logoutIntent);
                        finish();
                        break;
    
                    case R.id.navigation_donate:
                        Intent donateIntent = new Intent(ContactsActivity.this,donate.class);
                        startActivity(donateIntent);
                        finish();
                        break;
                }
    
                return true;
            }
        };
    
    
        @Override
        protected void onStart() {
            super.onStart();
    
            checkForReceivingCall();
    
            validateUser();
    
            FirebaseRecyclerOptions<Contacts> options
                    = new FirebaseRecyclerOptions.Builder<Contacts>()
                    .setQuery(contactsRef.child(currentUserId), Contacts.class)
                    .build();
    
            FirebaseRecyclerAdapter<Contacts, ContactsViewHolder> firebaseRecyclerAdapter
    
                    =new FirebaseRecyclerAdapter<Contacts, ContactsViewHolder>(options) {
                @Override
                protected void onBindViewHolder(@NonNull final ContactsViewHolder holder, int i, @NonNull Contacts contacts) {
    
    
                    final String listUserId = getRef(i).getKey();
    
                    usersRef.child(listUserId).addValueEventListener(new ValueEventListener() {
                        @Override
                        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
    
                            if(dataSnapshot.exists()){
    
    
                                userName = dataSnapshot.child("name").getValue().toString();
                                profileImage = dataSnapshot.child("image").getValue().toString();
    
                                holder.userNameTxt.setText(userName);
                                Picasso.get().load(profileImage).into(holder.profileImageView);
    
                                holder.callBtn.setOnClickListener(new View.OnClickListener() {
                                    @Override
                                    public void onClick(View view) {
    
    
                                        Intent callingIntent = new Intent(ContactsActivity.this, CallingActivity.class);
                                        callingIntent.putExtra("visit_user_id", listUserId);
                                        startActivity(callingIntent);
    
    
                                    }
                                });
    
                            }
    
                        }
    
                        @Override
                        public void onCancelled(@NonNull DatabaseError databaseError) {
    
                        }
                    });
    
                }
    
                @NonNull
                @Override
                public ContactsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
    
                    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.contact_design,parent,false);
    
                    ContactsViewHolder viewHolder = new ContactsViewHolder(view);
                    return viewHolder;
    
                }
            };
    
            myContactsList.setAdapter(firebaseRecyclerAdapter);
            firebaseRecyclerAdapter.startListening();
        }
    
    
    
    
        public static class ContactsViewHolder extends RecyclerView.ViewHolder{
    
            TextView userNameTxt;
            Button callBtn;
            ImageView profileImageView;
    
    
    
            public ContactsViewHolder(@NonNull View itemView) {
                super(itemView);
    
                userNameTxt = itemView.findViewById(R.id.name_contact);
                callBtn = itemView.findViewById(R.id.call_btn);
                profileImageView = itemView.findViewById(R.id.image_contact);
    
            }
        }
    
        private void validateUser() {
    
            DatabaseReference reference = FirebaseDatabase.getInstance().getReference();
    
            reference.child("Users").child(currentUserId).addValueEventListener(new ValueEventListener() {
                @Override
                public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
    
    
    
                }
    
                @Override
                public void onCancelled(@NonNull DatabaseError databaseError) {
    
                    Intent settingIntent = new Intent(ContactsActivity.this, SettingsActivity.class);
                    startActivity(settingIntent);
                    finish();
    
                }
            });
        }
    
    
        private void checkForReceivingCall() {
    
            usersRef.child(currentUserId)
                    .child("Ringing")
                    .addValueEventListener(new ValueEventListener() {
                        @Override
                        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
    
                            if (dataSnapshot.hasChild("ringing")){
    
                                calledBy = dataSnapshot.child("ringing").getValue().toString();
    
                                Intent callingIntent = new Intent(ContactsActivity.this, CallingActivity.class);
                                callingIntent.putExtra("visit_user_id", calledBy);
                                startActivity(callingIntent);
    
    
                            }
    
                        }
    
                        @Override
                        public void onCancelled(@NonNull DatabaseError databaseError) {
    
                        }
                    });
    
        }
    
    }

Build gradle :app

    apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    defaultConfig {
        applicationId "com.conta.ftof"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 3
        versionName "1.2"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-auth:19.3.1'
    implementation 'com.google.firebase:firebase-database:19.3.0'
    implementation 'com.google.firebase:firebase-core:17.4.3'
    implementation 'com.firebaseui:firebase-ui-database:3.2.2'
    implementation 'com.hbb20:ccp:2.1.9'
    implementation 'pub.devrel:easypermissions:0.4.0'
    implementation 'com.android.support:percent:29.0.0'
    implementation 'com.google.android.gms:play-services-ads:19.4.0'


    implementation 'com.google.firebase:firebase-storage:19.1.1'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.navigation:navigation-fragment:2.2.2'
    implementation 'androidx.navigation:navigation-ui:2.2.2'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'com.opentok.android:opentok-android-sdk:2.15.3'
    implementation 'pub.devrel:easypermissions:0.4.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'

}

Build gradle project

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"
        classpath 'com.google.gms:google-services:4.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

        maven { url 'https://maven.google.com'}
        maven { url 'https://tokbox.bintray.com/maven'}
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Callingactivity

    package com.conta.ftof;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.FirebaseException;
import com.google.firebase.FirebaseNetworkException;
import com.google.firebase.FirebaseTooManyRequestsException;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.PhoneAuthCredential;
import com.google.firebase.auth.PhoneAuthProvider;
import com.hbb20.CountryCodePicker;

import java.util.concurrent.TimeUnit;

public class RegistrationActivity extends AppCompatActivity {

    private CountryCodePicker ccp;
    private EditText phoneText;
    private EditText codeText;
    private Button continueAndNextBtn;
    private String checker = "", phoneNumber = "";
    private RelativeLayout relativeLayout;
    private static final String TAG = "RegistrationActivity";


    private PhoneAuthProvider.OnVerificationStateChangedCallbacks mCallbacks;
    private FirebaseAuth mAuth;
    private String mVerificationid;
    private PhoneAuthProvider.ForceResendingToken mResendToken;
    private ProgressDialog loadingBar;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_registration);

        mAuth = FirebaseAuth.getInstance();
        loadingBar = new ProgressDialog(this );

        phoneText = findViewById(R.id.phoneText);
        codeText = findViewById(R.id.codeText);
        continueAndNextBtn = findViewById(R.id.continueNextButton);
        relativeLayout = findViewById(R.id.PhoneAuth);

        ccp = (CountryCodePicker) findViewById(R.id.ccp); //trova il country code (in it è +39) dall'id del telefono android
        ccp.registerCarrierNumberEditText(phoneText);

        continueAndNextBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) { //View v = View view

                if(continueAndNextBtn.getText().equals("Submit") || checker.equals("Codice Inviato")){

                    String verificationCode = codeText.getText().toString();

                    if (verificationCode.equals("")){

                        Toast.makeText(RegistrationActivity.this, "Perfavore scrivi il tuo codice di verifica", Toast.LENGTH_SHORT).show();

                    }
                    else{
                        loadingBar.setTitle("Codice Di Verifica....");
                        loadingBar.setMessage("Perfavore, attendi la verifica....");
                        loadingBar.setCanceledOnTouchOutside(false);
                        loadingBar.show();

                        PhoneAuthCredential credential = PhoneAuthProvider.getCredential(mVerificationid, verificationCode);
                        signInWithPhoneAuthCredential(credential);
                    }

                }
               else{

                   phoneNumber = ccp.getFullNumberWithPlus();

                   if(!phoneNumber.equals("")){

                       loadingBar.setTitle("Verifica del numero....");
                       loadingBar.setMessage("Perfavore, attendi la verifica....");
                       loadingBar.setCanceledOnTouchOutside(false);
                       loadingBar.show();

                       PhoneAuthProvider.getInstance().verifyPhoneNumber(
                               phoneNumber,
                               60,
                               TimeUnit.SECONDS,
                               RegistrationActivity.this,
                               mCallbacks);


                   }

                   else{

                       Toast.makeText(RegistrationActivity.this, "Perfavore, controlla il tuo numero di telefono...", Toast.LENGTH_SHORT).show();
                   }
                }
            } //da tenere d'occhio
        });

        mCallbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {
            @Override
            public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {

                signInWithPhoneAuthCredential(phoneAuthCredential);

            }

            @Override
            public void onVerificationFailed(FirebaseException e) {

                if (e instanceof FirebaseAuthInvalidCredentialsException) {
                    Toast.makeText(RegistrationActivity.this, "Numero inserito non valido...", Toast.LENGTH_SHORT).show();
                }
                else if (e instanceof FirebaseTooManyRequestsException) {
                    Toast.makeText(RegistrationActivity.this, "Troppe richieste per questo numero di telefono, riprova tra 24h", Toast.LENGTH_SHORT).show();
                }

                else if (e instanceof FirebaseNetworkException){
                    Toast.makeText(RegistrationActivity.this, "Errore di rete...", Toast.LENGTH_SHORT).show();
                }

                else {

                    Toast.makeText(RegistrationActivity.this, "Errore sconosciuto", Toast.LENGTH_SHORT).show();
                }

                Log.e(TAG,  "err : " + e);
                loadingBar.dismiss();


               // Toast.makeText(RegistrationActivity.this, "Numero inserito non valido...", Toast.LENGTH_SHORT).show();
                relativeLayout.setVisibility(View.VISIBLE);


                continueAndNextBtn.setText("Continue"); //Continue
                codeText.setVisibility(View.GONE);


            }



            @Override
            public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {
                super.onCodeSent(s, forceResendingToken);
                mVerificationid = s; //Id
                mResendToken = forceResendingToken;


                relativeLayout.setVisibility(View.GONE);
                checker = "Codice Inviato";
                continueAndNextBtn.setText("Invia");
                codeText.setVisibility(View.VISIBLE);

                loadingBar.dismiss();

                Toast.makeText(RegistrationActivity.this, "Il codice è stato mandato.....", Toast.LENGTH_SHORT).show();
            }
        };


    }

    @Override
    protected void onStart() {
        super.onStart();
        FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser();

        if(firebaseUser != null){

            Intent homeIntent = new Intent(RegistrationActivity.this, ContactsActivity.class);
            startActivity(homeIntent);
            finish();
        }
    }

    private void signInWithPhoneAuthCredential(PhoneAuthCredential credential) {
        mAuth.signInWithCredential(credential)
                .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if (task.isSuccessful()) {
                            loadingBar.dismiss();
                            sendUserToMainActivity();

                            Toast.makeText(RegistrationActivity.this, "Congratulazioni...", Toast.LENGTH_SHORT).show();

                        } else {
                            // Sign in failed, display a message and update the UI
                            loadingBar.dismiss();
                            String e = task.getException().toString();
                            Toast.makeText(RegistrationActivity.this, "Errore "+e, Toast.LENGTH_SHORT).show();
                        }
                    }
                });
    }

    private void sendUserToMainActivity(){

        Intent intent = new Intent(RegistrationActivity.this, ContactsActivity.class);
        startActivity(intent);
        finish();

    }
}

1 Answers1

0

If you are a beginner then i recommend you disable minifyEnabled in you build.gradle. basically the proguard obfuscates the code and you might not be escaping your model files in the proguard rules

android {
    ...

    buildTypes {
        release {
            minifyEnabled false // disable proguard
            ...
        }
    }
}

[UPDATE]: this is how you can escape files in progaurd

in your proguard-android-optimize.txt file do the following

if your all models are in same folder then :

-keep public class com.myapp.models.** {
  public protected private *;
}

else you can skip files using the following way :

-keep public class com.myapp.models.MyModel {
  public protected private *;
}
Harkal
  • 1,770
  • 12
  • 28
  • Although it might work in case if the model classes were being obfuscated during building apk. But I don't recommend it cause it will not shrink resource and might cause slightly more apk size. It's better to ignore model class packages by mentioning in the pro guard rules. But the answer is quite an opinion based. – AgentP Oct 16 '20 at 15:30
  • @AgentP yes thats what i would do. but person who has asked seems a beginnners so i just told the temperory solution. rest the person must expose the paths of model classes for getting progaurd rules for escaping the model classes ;) – Harkal Oct 16 '20 at 15:42
  • I added the crush logcat – Pietro Contadini Oct 16 '20 at 17:51
  • 1
    @PietroContadini the log cant help. because the file is already obfuscated. you see the error `No properties to serialize found on class c.b.a.d` so either you disbale progaurd or just write valid rules to escape your model files – Harkal Oct 16 '20 at 17:55
  • it gives me this error to sync build gradle: Could not get unknown property 'post' for BuildType_Decorated {name = release, debuggable = false, testCoverageEnabled = false, jniDebuggable = false, pseudoLocalesEnabled = false, renderscriptDebuggable = false, renderscriptOptimLevel = 3, minifyabled = false, zipAlignEnabled = true, signingConfig = null, embedMicroApp = true, mBuildConfigFields = {}, mResValues ​​= {}, mProguardFiles = [], mConsumerProguardFiles = [], mManifestPlaceholders = {}} of type com.android.build.gradle. internal.dsl.BuildType. – Pietro Contadini Oct 16 '20 at 18:35
  • @PietroContadini what did you try. update the question and let me know – Harkal Oct 16 '20 at 18:56
  • @Harkal i tried to disable the proguard and now it gives me this error – Pietro Contadini Oct 16 '20 at 19:05
  • I can't disable post guard because otherwise this error will be present: `Could not get unknown property 'post' for BuildType_Decorated` So how do I write valid rules to escape my model files ? – Pietro Contadini Oct 16 '20 at 19:26
  • One questions, what is 'com.myapp.models'? – Pietro Contadini Oct 16 '20 at 19:41
  • its the package of the models in your app. lets say your app id id `com.myapp` and in your app all the model classes are kept in `models` folder then in progaurd you can escape the whole folder using `com.myapp.models.**`. – Harkal Oct 16 '20 at 19:43
  • @Harkal I will, but give me one last question. How do I know if my models are in the same folder?? – Pietro Contadini Oct 16 '20 at 19:48
  • @PietroContadini ok go ahead – Harkal Oct 16 '20 at 19:50
  • @PietroContadini its you who have coded the project so you know where are all the models kept. ites not neccessary that you keep your models in once place. thats why i have given you code for both cases. you can escape the whole package or specific file – Harkal Oct 16 '20 at 19:51
  • I try with the first code, in the meantime I put you as a solution – Pietro Contadini Oct 16 '20 at 19:52
  • there continues to be that logcat in debug mode (which does not stop the app) now I try in relase mode, tomorrow in case it doesn't work I'll let you know – Pietro Contadini Oct 16 '20 at 20:04
  • @PietroContadini better disbale the progaurd for now and give a relase – Harkal Oct 16 '20 at 20:05
  • but if I disable it it gives me this error: `Could not get unknown property 'post' for BuildType_Decorated [...]` so now i try to see if the app keeps crashing in the release. Thanks, I'll let you know by tomorrow if I solved;) – Pietro Contadini Oct 16 '20 at 20:14