android - No empty constructor error, SurfaceHolder.callback -
I'm trying to display the camera view using a class See Activeivity: Groundhold Attachivity: logcat: Do you have your SurfaceHolderActivity : 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.
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); }
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);); }
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
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
Post a Comment