Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
295 views
in Technique[技术] by (71.8m points)

android - Unexpected behaviour of app after upload in google play that leads to crash

I had a working app in Google Play. After some changes in the code and checking that is worked properly on the emulator in debug mode, I uploaded the new signed version on Google Play (as I did several times before). But the last time I did it app start to crash with "java.lang.NullPointerException" due to trying format date which is null, because my request to the server (I use retrofit2 to create a request) does not retrieve any response (that is why date is null - default value). The one of thing I changed before upload the bundle is target version from 28 to 29 (Google Play new requirement).

enter image description here

This is the exception I can see from Google Play console.

The app works in local machine unlike on Google Play. I haven't got any clue what can be the reason of this problem. I'll be glad if somebody can help with any idea. Thanks in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thank you mate. You directed me into right way and I solved the issue. I use Retrofit and Gson for data serialization and several of DTOs classes but obviously ProGuard rename the fields and serialization fails. To avoid this I just add @Keep annotation to all my DTO classes and ... it works. Thank you


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...