Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Camera Preview Code not working with Nexus7 -surfaceView error
    primarykey
    data
    text
    <p>I've created a camera app for android with the android camera code tutorial <a href="http://developer.android.com/guide/topics/media/camera.html#custom-camera" rel="nofollow">http://developer.android.com/guide/topics/media/camera.html#custom-camera</a>. It works for the XperiaZ - LgoptimusBlack- GalaxyNexus4 and some other devices. But with the Nexus-7 android 4.2.2 it gave's me an surfaceview error , it cannot create the camera preview on the surface. I've tried some other samples me but without results. here is the logcat :</p> <pre><code> FATAL EXCEPTION: main java.lang.NullPointerException at com.test.mycamera.CameraPreview.surfaceCreated(CameraPreview.java:33) at android.view.SurfaceView.updateWindow(SurfaceView.java:569) at android.view.SurfaceView.access$000(SurfaceView.java:86) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:680) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1842) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) at android.view.Choreographer.doCallbacks(Choreographer.java:562) at android.view.Choreographer.doFrame(Choreographer.java:532) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload