第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

能幫我看看這個(gè)空指針異常是怎么回事?求大神指點(diǎn)

能幫我看看這個(gè)空指針異常是怎么回事?求大神指點(diǎn)

慕沐林林 2023-04-24 22:18:35
這是logcat報(bào)錯(cuò)信息這是報(bào)錯(cuò)函數(shù)的代碼(識(shí)別圖片中字符的函數(shù))public String decodeBitmapValue(String path) {BitmapFactory.Options options = new BitmapFactory.Options();options.inSampleSize = 2;Bitmap bitmap = BitmapFactory.decodeFile(IMAGE_PATH, options); Log.i(TAG, "---in ocr() before try--");try {Log.v(TAG, "not in the exception");ExifInterface exif = new ExifInterface(IMAGE_PATH);int exifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); Log.v(TAG, "Orient: " + exifOrientation); int rotate = 0;switch (exifOrientation) {case ExifInterface.ORIENTATION_ROTATE_90:rotate = 90;break;case ExifInterface.ORIENTATION_ROTATE_180:rotate = 180;break;case ExifInterface.ORIENTATION_ROTATE_270:rotate = 270;break;} Log.i(TAG, "Rotation: " + rotate); } catch (IOException e) {Log.e(TAG, "Rotate or coversion failed: " + e.toString());Log.v(TAG, "in the exception");} Log.i(TAG, "Bitmap創(chuàng)建成功");if (bitmap == null) {return null;}baseApi.init(TESSBASE_PATH, DEFAULT_LANGUAGE);bitmap = bitmap.copy(Bitmap.Config.ARGB_8888, false);baseApi.setImage(bitmap);Log.i(TAG, "Bitmap加載成功");String value = baseApi.getUTF8Text();Log.i("TAG", " the value is ===> " + value);baseApi.clear();baseApi.end();return value;}
查看完整描述

1 回答

?
HUH函數(shù)

TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超4個(gè)贊

你153行有個(gè)對(duì)象是null的。

查看完整回答
反對(duì) 回復(fù) 2023-04-27
  • 1 回答
  • 0 關(guān)注
  • 227 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)