Simple Android Camera App - Rotation causes NullPointerException

前端 未结 1 1189
旧时难觅i
旧时难觅i 2021-01-07 08:10

I\'m new to Android development and was playing around with the camera. I just wanted to create a simple app that would take a photo using the native camera app and give me

相关标签:
1条回答
  • 2021-01-07 08:53

    you have to change your manifest file

    in your manifest just replace below code

    <activity android:name=".CameraTestActivity"
                  android:label="@string/app_name" android:configChanges="keyboardHidden|orientation">
    

    with your code

    <activity android:name=".CameraTestActivity"
                  android:label="@string/app_name">
    
    0 讨论(0)
提交回复
热议问题