我正在尝试运行"BitmapFun"官方示例,但收到以下错误:
1)无法解析符号KITKAT 2)无法解析方法getAllocationByteCount()
有帮助吗?
我的AndroidManifest.xml:
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="19" />
Run Code Online (Sandbox Code Playgroud)
这是代码:
@TargetApi(VERSION_CODES.KITKAT)
public static int getBitmapSize(BitmapDrawable value) {
Bitmap bitmap = value.getBitmap();
// From KitKat onward use getAllocationByteCount() as allocated bytes can potentially be
// larger than bitmap byte count.
if (Utils.hasKitKat()) {
return bitmap.getAllocationByteCount();
}
if (Utils.hasHoneycombMR1()) {
return bitmap.getByteCount();
}
// Pre HC-MR1
return bitmap.getRowBytes() * bitmap.getHeight();
}
Run Code Online (Sandbox Code Playgroud) 
昨天,我的孩子已经通过直接从墙上电源拔掉我的电脑了.当我今天推出Android Studio时,如图所示......

我试过了:
任何帮助?