android - No empty constructor error, SurfaceHolder.callback -


I'm trying to display the camera view using a class surfaceview and applies surfaceholder .callback . In my main activity, ViewActivity , which you set below as a scene using the illustration of an object and setContentView (myCameraSurfaceHolder) from SurfaceHolderActivity ; . While running the app on the device, it crashes and Lockat says an error is not an empty constructor Please help me find the error.

See Activeivity:

  Personal PageFolderHold Attachments myCameraSurfaceHolder; Personal android.hardware.Camera myCamera; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); Centricized Orientation (activity information. SCREEN_ORIENTATION_LANDSCAPE); RequestWindowFeature (window.FEATURE_NO_TITLE); . GetWindow () setFormat (PixelFormat.TRANSPARENT); GetWindow () Setflag (Window Manager. LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); MyCameraSurfaceHolder = New Surface HolderActivity (this); SetContentView (myCameraSurfaceHolder); }   

Groundhold Attachivity:

  Public PageRank (Reference Reference) {Super (Reference); // To-O Auto-Generated Constructor Stub this.mySurfaceHorder = this.getHolder (); This.mySurfaceHorder.addClallback (this); //this.mySurfaceHorder.setType (mySurfaceHorder.SURFACE_TYPE_PUSH_BUFFERS); //this.mySurfaceHorder.setFormat(mySurfaceHorder.setFormat(PixelFormat.TRANSLUCENT);); }   

logcat:

  04-24 04: 34: 07.406: E / AndroidRuntime (21,420): Fatal exception: Main 04-24 04 : 34: 07.406: E / AndroidRuntime (21,420): java.lang.RuntimeException: java.lang.InstantiationException: Can not illustrate the class com activity at omponentInfo {com.example.augrealtest00 / com.example.augrealtest00 Unable to. SurfaceHolderActivity}. Example.augrealtest00.SurfaceHolderActivity; Any empty constructor    

Do you have your SurfaceHolderActivity :

Public PageRank (Reference Reference) {Super (Reference); // Todo auto-generated generator stub this.mySurfaceHorder = this.getHolder (); This.mySurfaceHorder.addClallback ( context ); //this.mySurfaceHorder.setType (mySurfaceHorder.SURFACE_TYPE_PUSH_BUFFERS); //this.mySurfaceHorder.setFormat(mySurfaceHorder.setFormat(PixelFormat.TRANSLUCENT);); }

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -