App crashes while starting CameraFragment
See original GitHub issueApp crashes at first run.
2019-05-10 10:11:08.013 3579-3579/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.example.cameraxbasic, PID: 3579
java.lang.ArithmeticException: divide by zero
at androidx.camera.camera2.impl.SupportedSurfaceCombination.getAllPossibleSizeArrangements(SupportedSurfaceCombination.java:435)
at androidx.camera.camera2.impl.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:195)
at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:185)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:449)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:144)
at com.android.example.cameraxbasic.fragments.CameraFragment.bindCameraUseCases(CameraFragment.kt:313)
at com.android.example.cameraxbasic.fragments.CameraFragment.access$bindCameraUseCases(CameraFragment.kt:104)
at com.android.example.cameraxbasic.fragments.CameraFragment$onViewCreated$1.run(CameraFragment.kt:241)
at android.os.Handler.handleCallback(Handler.java:878)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:209)
at android.app.ActivityThread.main(ActivityThread.java:7046)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
2019-05-10 10:11:32.185 4832-4832/com.android.example.cameraxbasic E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.example.cameraxbasic, PID: 4832
java.lang.ArithmeticException: divide by zero
at androidx.camera.camera2.impl.SupportedSurfaceCombination.getAllPossibleSizeArrangements(SupportedSurfaceCombination.java:435)
at androidx.camera.camera2.impl.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:195)
at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:185)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:449)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:144)
at com.android.example.cameraxbasic.fragments.CameraFragment.bindCameraUseCases(CameraFragment.kt:313)
at com.android.example.cameraxbasic.fragments.CameraFragment.access$bindCameraUseCases(CameraFragment.kt:104)
at com.android.example.cameraxbasic.fragments.CameraFragment$onViewCreated$1.run(CameraFragment.kt:241)
at android.os.Handler.handleCallback(Handler.java:878)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:209)
at android.app.ActivityThread.main(ActivityThread.java:7046)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
App crashes when running code from in fragment
Yes it crashes because findViewById wasn't called from the fragment_calendar layout before returning inflater therefore anything called after ...
Read more >Why do my apps keep crashing on Android, How to fix it
To do this, go to Settings -> Apps and select the app that keeps crashing. Tap on the app's name and then tap...
Read more >Why Do My Apps Keep Crashing on Android? - Avast
Apps on Android can crash because of low storage space, too many apps running simultaneously, a weak internet connection, or not having the ......
Read more >What to Do If Apps Keep Crashing on an Android Device
1. Start the Settings app. · 2. Tap Apps & notifications. · 3. Find the crashing app in the list of apps. You...
Read more >How to Fix Crashing Apps on an iPhone or Android?
You'll know it's worked when the start logo flashes up. Update App To The Last Version, The App Crash Fixer. Sometimes app-crashing is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has now been fixed, please upgrade to
1.0.0-alpha02
version of CameraX:me too