Configured.java

概述

1、配置类,提供了设置配置以及获取配置的方法

Configured.java

package com.ruanwenfu.base;

import com.ruanwenfu.InterfaceAudience;
import com.ruanwenfu.InterfaceStability;

/**
 * 可配置类
 */
@InterfaceAudience.Public
@InterfaceStability.Stable
public class Configured implements Configurable{

    private Configuration conf;

    /** 无参构造方法
     *  无参构造 配置项为空
     * */
    public Configured(){
        this(null);
    }

    /** 有参构造*/
    public Configured(Configuration conf){
        setConf(conf);
    }

    /** 设置配置 */
    @Override
    public void setConf(Configuration conf) {
        this.conf = conf;
    }

    /** 返回配置 */
    @Override
    public Configuration getConf() {
        return conf;
    }
}

E/CameraX: No default CameraXConfig.Provider specified in meta-data. The most likely cause is you did not include a default implementation in your build such as 'camera-camera2'. D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.photodiary, PID: 14237 java.lang.IllegalStateException: CameraX is not configured properly. The most likely cause is you did not include a default implementation in your build such as 'camera-camera2'. at androidx.camera.core.CameraX.<init>(CameraX.java:109) at androidx.camera.lifecycle.ProcessCameraProvider.getOrCreateCameraXInstance(ProcessCameraProvider.java:181) at androidx.camera.lifecycle.ProcessCameraProvider.getInstance(ProcessCameraProvider.java:167) at com.example.photodiary.Diary.startCamera(Diary.java:43) at com.example.photodiary.Diary.access$000(Diary.java:20) at com.example.photodiary.Diary$1.onClick(Diary.java:32) at android.view.View.performClick(View.java:7125) at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1131) at android.view.View.performClickInternal(View.java:7102) at android.view.View.access$3500(View.java:801) at android.view.View$PerformClick.run(View.java:27336) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/Process: Sending signal. PID: 14237 SIG: 9
05-24
E/CameraX: No default CameraXConfig.Provider specified in meta-data. The most likely cause is you did not include a default implementation in your build such as 'camera-camera2'. D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.photodiary, PID: 14550 java.lang.IllegalStateException: CameraX is not configured properly. The most likely cause is you did not include a default implementation in your build such as 'camera-camera2'. at androidx.camera.core.CameraX.<init>(CameraX.java:109) at androidx.camera.lifecycle.ProcessCameraProvider.getOrCreateCameraXInstance(ProcessCameraProvider.java:181) at androidx.camera.lifecycle.ProcessCameraProvider.getInstance(ProcessCameraProvider.java:167) at com.example.photodiary.Diary.startCamera(Diary.java:43) at com.example.photodiary.Diary.access$000(Diary.java:20) at com.example.photodiary.Diary$1.onClick(Diary.java:32) at android.view.View.performClick(View.java:7125) at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1131) at android.view.View.performClickInternal(View.java:7102) at android.view.View.access$3500(View.java:801) at android.view.View$PerformClick.run(View.java:27336) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) I/Process: Sending signal. PID: 14550 SIG: 9
最新发布
05-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值