1、修改manifest文件,将CaptureActivity设为portrait android:screenOrientation="portrait" 2、在DecodeHandler.java文件中,找到decode(byte[],int,int)方法,在buildLuminanceSource调用前,加上如下: byte[] rotatedData = newbyte[data.length]; for(inty = 0; y < height; y++) { for(intx = 0; x < width; x++) rotatedData[x * height