Examples_07_06 无法下载android的sdk

在hosts里面配置。

74.125.237.1 dl-ssl.google.com

在AndroidManifest.xml中添加

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />

public void surfaceDestroyed(SurfaceHolder holder) 

    {

        /* 停止预览 */

        mCamera.stopPreview();

        mCamera.release();

        mCamera = null;

    }

 

 

Canvas canvas = null;
try {
mHolder = getHolder();
canvas= mHolder.lockCanvas();
canvas.drawBitmap(CameraBitmap, 0, 0, null);
mHolder.unlockCanvasAndPost(canvas);
} catch (Exception e) {
if(canvas!=null){
mHolder.unlockCanvasAndPost(canvas);
}
}

上面这段代码注释掉。

你可能感兴趣的:(android)