Resolved [9.8.1] K20 PRO - Camera app doesn't work


Adavius

Members
Jul 27, 2019
48
30
I just flashed 9.8.1 xiaomi.eu and the camera app doesn't open. I always receive an error saying camera keeps crashing. Other camera apps work fine.
 
  • Like
Reactions: z953rr
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.camera/com.android.camera.Camera}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.libraries.lens.lenslite.LensliteApi.onStart(com.google.android.libraries.lens.lenslite.LensliteUiContainer, android.app.Activity, com.google.android.libraries.lens.lenslite.StatusUpdateCallback)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(Unknown Source:591)
at android.app.ActivityThread.handleLaunchActivity(Unknown Source:36)
at android.app.servertransaction.LaunchActivityItem.execute(Unknown Source:57)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(Unknown Source:99)
at android.app.servertransaction.TransactionExecutor.execute(Unknown Source:34)
at android.app.ActivityThread$H.handleMessage(Unknown Source:43)
at android.os.Handler.dispatchMessage(Unknown Source:21)
at android.os.Looper.loop(Unknown Source:208)
at android.app.ActivityThread.main(Unknown Source:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
at com.android.internal.os.ZygoteInit.main(Unknown Source:274)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.libraries.lens.lenslite.LensliteApi.onStart(com.google.android.libraries.lens.lenslite.LensliteUiContainer, android.app.Activity, com.google.android.libraries.lens.lenslite.StatusUpdateCallback)' on a null object reference
at com.android.lens.LensAgent.init(Unknown Source:24)
at com.android.camera.Camera.onCreate(Unknown Source:436)
at android.app.Activity.performCreate(Unknown Source:16)
at android.app.Activity.performCreate(Unknown Source:1)
at android.app.Instrumentation.callActivityOnCreate(Unknown Source:3)
at android.app.ActivityThread.performLaunchActivity(Unknown Source:368)
... 11 more
 
25574
 
Can confirm. Wiping data/cache doesn't do anything. I even wiped data and cache/dalvik from TWRP. Still have the issue.
 
Flash this, let me know if it solves the issue: (clear Camera app data after flashing)
*removed*
 
  • Like
Reactions: twofun
It works! Any idea why this happened?
Thank you for taking the time to solve this! Works perfectly now.
Xiaomi removed a certain piece of code that was essential to built-in Google Lens. I forced a secondary Google Lens mode, like on other devices.