如果我尝试设置 CheckBox 的选中状态它不起作用,我已经阅读了其他人的许多线程,我所能得到的只是它每次都返回一个不同的复选框,但我正在设置这个新复选框,所以为什么它没有在我的微调器中检查?
classesName.setAdapter(new SpinnerAdapter() {
@Override
public void unregisterDataSetObserver(DataSetObserver observer) {
}
@Override
public void registerDataSetObserver(DataSetObserver observer) {
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public int getViewTypeCount() {
return 0;
}
@Override
public View getView(int arg0, View arg1, ViewGroup arg2) {
LayoutInflater inflater = Registeration.this.getLayoutInflater();
View spinView = inflater.inflate(R.layout.classes_registeration_ddl, null);
CheckBox rbtn = (CheckBox) spinView.findViewById(R.id.radioButtonClassesReg);
rbtn.setChecked(true);
return spinView;
}
@Override
public int getItemViewType(int arg0) {
return 0; …Run Code Online (Sandbox Code Playgroud) 当运行版本 0.0.81 的 Flutter build apk 时,会抛出以下错误
工作人员引发了 1 个异常:java.lang.RuntimeException:在模块 jetified-exoplayer-core-2.17.0-runtime.jar (com.google.android.exoplayer) 中找到重复的类 com.google.android.exoplayer2.ui.DownloadNotificationHelper :exoplayer-core:2.17.0) 和 jetified-exoplayer-ui-2.15.1-runtime.jar (com.google.android.exoplayer:exoplayer-ui:2.15.1)[BUG]
我试图排除 android 的 build.gradle 中的模块和组,但它仍然不起作用。我的pubspec.yaml环境:sdk:">=2.7.0 <3.0.0"
那么我该如何使用 better_player: 0.0.81
这是我的装饰师
import { createParamDecorator, ExecutionContext } from "@nestjs/common";
export const CacheData = createParamDecorator(
(data: any, ctx: ExecutionContext) => {
const request = ctx.switchToHttp().getRequest();
console.log(request.url, request.method, 'request');
const response = ctx.switchToHttp().getResponse();
const reqBody = request.body;
console.log(reqBody, 'reqBody');
console.log(response.raw.req.data, 'response');
console.log(response.raw.req.body, 'response');
console.log(response.raw.data, 'response');
console.log(response.cacheData, 'response');
}
);
Run Code Online (Sandbox Code Playgroud)
在我的控制器函数中,我使用装饰器,如下所示:
getStringsArr(
@Headers('Authorization') auth: string,
@Headers('Country') country = 'DK',
@CacheData() cacheData,
): Array<string> {
return ['Hello', 'World', '!'];
}
Run Code Online (Sandbox Code Playgroud)
那么如何在 CacheData 装饰器中访问响应数据呢?