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);
}
}

上面这段代码注释掉。

posted @ 2013-09-03 13:30  唾手可得的树  阅读(146)  评论(0编辑  收藏  举报