Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-调用需要API级别11(当前最小值为8):Android.widget.ImageView#setAlpha_Android_Eclipse - Fatal编程技术网

Android-调用需要API级别11(当前最小值为8):Android.widget.ImageView#setAlpha

Android-调用需要API级别11(当前最小值为8):Android.widget.ImageView#setAlpha,android,eclipse,Android,Eclipse,它向我显示了setAlpha的错误 private void updateNextButton(){ if(currentPosition == totalItem - 1){ nextBtn.setAlpha(0.5f); nextBtn.setClickable(false); } else{ nextBtn.setAlpha(1f); nextBtn.setClickable(true); }

它向我显示了setAlpha的错误

private void updateNextButton(){
    if(currentPosition == totalItem - 1){
        nextBtn.setAlpha(0.5f);
        nextBtn.setClickable(false);
    }
    else{
        nextBtn.setAlpha(1f);
        nextBtn.setClickable(true);
    }
}
日志给出了以下错误

--

java.lang.NoSuchMethodError:android.widget.ImageView.setAlpha
请帮助我一些设备出现错误。

这意味着您将应用程序定义为在Android版本下至8版上运行。要使用的功能需要API 11。您可以将min SDK设置为11来修复它,或者寻找将在API 8上运行该功能的第三方库

仅在API 11中添加。请查看NineodelDroids库作为替换: