1
java.lang.RuntimeException: Unable to create application com.example.me.MyApplication: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7494)
    at android.app.ActivityThread.access$1700(ActivityThread.java:310)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2281)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8646)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.

I got only this error with Galaxy S22.

As far as I searched, some devices from Hawei also face this problem.

How can I solve this?

I tried:

<application
...
    android:allowBackup="false"
    android:fullBackupContent="false"
    tools:replace="android:allowBackup"
...

And upgraded library to:

    implementation 'androidx.security:security-crypto:1.1.0-alpha03'

But this method didn't solve the problem.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.