Java 通过单击项目启动另一个活动(recyclerview列表)

Java 通过单击项目启动另一个活动(recyclerview列表),java,android,android-recyclerview,onclicklistener,null-object-pattern,Java,Android,Android Recyclerview,Onclicklistener,Null Object Pattern,我的主要活动(MainActivity)包含回收器视图,其中包含cardview中的图像和文本列表。我试图在每个卡片视图上放置单独的onCLick侦听器,以便在单击任何卡片视图时,下一个活动开始(MainActivity2)。cardview显示频道图像和名称,单击任何频道时,用户将移动到该频道的视频列表。 回收者视图的主要活动代码 private String[] channelnames={"PTC Punjabi","Chakde TV",&quo

我的主要活动(MainActivity)包含回收器视图,其中包含cardview中的图像和文本列表。我试图在每个卡片视图上放置单独的onCLick侦听器,以便在单击任何卡片视图时,下一个活动开始(MainActivity2)。cardview显示频道图像和名称,单击任何频道时,用户将移动到该频道的视频列表。 回收者视图的主要活动代码


private String[] channelnames={"PTC Punjabi","Chakde TV","T-Series Punjabi", "9X Tashan", "Zee Punjabi" };
    private int[] channelimages={R.drawable.ptcpunjabi, R.drawable.chakde, R.drawable.tseries, R.drawable.ninex, R.drawable.zeepunjabi};
    private List<channel> channelList=new ArrayList<>();

 thirdrecyclerView=findViewById(R.id.third_recycler_view);
        thirdrecyclerView.setHasFixedSize(true);
        channelList=new ArrayList<>();
        LinearLayoutManager thirdlinearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
        thirdrecyclerView.setLayoutManager(thirdlinearLayoutManager);
        for (int i=0;i < channelnames.length;i++){
            channel channel=new channel(channelnames[i],channelimages[i]);
            channelList.add(channel);
        }
适配器和viewholder类定义为:

public class channeladpater extends RecyclerView.Adapter<channeladpater.Channelviewholder> {
    private List<channel> channelList;
    Context ctx;

    public channeladpater(List<channel> channelList) {
        this.channelList = channelList;
        this.ctx=ctx;
    }

    @NonNull
    @Override
    public Channelviewholder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.card_view,parent,false);
        return new Channelviewholder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull Channelviewholder holder, int position)
    {
        channel channel=channelList.get(position);
        holder.channelname.setText(channel.getChannelname());
        holder.channelimage.setImageResource(channel.getChannelimage());

        holder.setItemClickListener(new ItemClickListener() {
            @Override
            public void onItemClickListener(View v, int position) {
                Intent intent=new Intent(ctx, MainActivity2.class);
                ctx.startActivity(intent);

            }
        });

    }

    @Override
    public int getItemCount() {
        return channelList.size();
    }

    public static class Channelviewholder extends RecyclerView.ViewHolder implements View.OnClickListener{
        public TextView channelname;
        public CircleImageView channelimage;
        ItemClickListener itemClickListener;

        Channelviewholder(@NonNull View itemView) {
            super(itemView);
           this.channelname=itemView.findViewById(R.id.profile_name);
            this.channelimage=itemView.findViewById(R.id.profile_image);
            itemView.setOnClickListener(this);
        }

        @Override
        public void onClick(View v) {

            this.itemClickListener.onItemClickListener(v,getLayoutPosition());


        }
        public void setItemClickListener(ItemClickListener ic){
            this.itemClickListener=ic;
        }
    }
}
public类channelAdpeter扩展了RecyclerView.Adapter{
私人名单渠道名单;
上下文ctx;
公共信道适配器(列表信道列表){
this.channelList=channelList;
这个.ctx=ctx;
}
@非空
@凌驾
公共通道ViewHolder onCreateViewHolder(@NonNull ViewGroup父级,int-viewType){
View View=LayoutInflater.from(parent.getContext()).flate(R.layout.card_视图,parent,false);
返回新的Channel ViewHolder(视图);
}
@凌驾
公共无效onBindViewHolder(@NonNull Channelviewholder holder,int位置)
{
channel=channelList.get(位置);
holder.channelname.setText(channel.getChannelname());
holder.channelimage.setImageResource(channel.getChannelimage());
setItemClickListener(新的ItemClickListener(){
@凌驾
公共void侦听器(视图v,int位置){
意向意向=新意向(ctx,MainActivity2.class);
星触觉(意图);
}
});
}
@凌驾
public int getItemCount(){
返回channelList.size();
}
公共静态类Channelviewholder扩展了RecyclerView.ViewHolder实现了View.OnClickListener{
公共文本视图频道名称;
公众形象;公众形象;
ItemClickListener ItemClickListener;
Channelviewholder(@NonNull View itemView){
超级(项目视图);
this.channelname=itemView.findviewbyd(R.id.profile\u name);
this.channelimage=itemView.findviewbyd(R.id.profile\u image);
setOnClickListener(这个);
}
@凌驾
公共void onClick(视图v){
this.itemClickListener.onItemClickListener(v,getLayoutPosition());
}
public void setItemClickListener(ItemClickListener ic){
this.itemClickListener=ic;
}
}
}
MAinActivity 2是一个使用youtube DataAPI的频道视频的回收者查看列表;代码的例外是

public class MainActivity2 extends AppCompatActivity {

        RecyclerView recyclerView;
        ArrayList<VideoDetails> videoDetailsoArrayList;
       
        Intent intent=getIntent();
公共类MainActivity2扩展了AppCompatActivity{
回收视图回收视图;
ArrayList视频列表;
Intent=getIntent();
这是我希望在单击时运行的MainActivity2的屏幕截图。

但当我点击图标时,应用程序崩溃

2020-09-18 00:34:33.348 30473-30514/com.currentmedia.punjabinews E/cr_VariationsUtils: Failed reading seed file "/data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed": /data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed (No such file or directory)
2020-09-18 00:34:33.697 30473-30553/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:33.698 30473-30553/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.255 30473-30593/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.256 30473-30593/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.923 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.022 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.062 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.121 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.170 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.194 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.197 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.213 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.215 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.224 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.266 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.269 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.270 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.273 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.278 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.289 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.293 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.297 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.301 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.306 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.308 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.313 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.470 30473-30596/com.currentmedia.punjabinews E/YouTubeAndroidPlayerAPI: Embed config is not supported in RemoteEmbeddedPlayer.
2020-09-18 00:34:37.997 30473-30473/com.currentmedia.punjabinews E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.currentmedia.punjabinews, PID: 30473
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
        at android.content.ComponentName.<init>(ComponentName.java:130)
        at android.content.Intent.<init>(Intent.java:5780)
        at com.currentmedia.punjabinews.channeladpater$1.onItemClickListener(channeladpater.java:47)
        at com.currentmedia.punjabinews.channeladpater$Channelviewholder.onClick(channeladpater.java:75)
        at android.view.View.performClick(View.java:6294)
        at android.view.View$PerformClick.run(View.java:24770)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2020-09-18 00:34:49.144 30473-30593/com.currentmedia.punjabinews E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -19
2020-09-18 00:34:49.145 30473-30593/com.currentmedia.punjabinews E/EGL_emulation: tid 30593: swapBuffers(552): error 0x300d (EGL_BAD_SURFACE)
2020-09-18 00:34:33.348 30473-30514/com.currentmedia.punjabinews E/cr_VariationsUtils:读取种子文件失败“/data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed”:/data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed(无此类文件或目录)
2020-09-18 00:34:33.697 30473-30553/com.currentmedia.punjabinews E/eglcodeccon:glUtilsParamSize:unknow参数0x000082da
2020-09-18 00:34:33.698 30473-30553/com.currentmedia.punjabinews E/eglcodeccon:glUtilsParamSize:unknow参数0x000082da
2020-09-18 00:34:34.255 30473-30593/com.currentmedia.punjabinews E/eglcodeccon:glUtilsParamSize:unknow参数0x000082da
2020-09-18 00:34:34.256 30473-30593/com.currentmedia.punjabinews E/eglcodeccon:glUtilsParamSize:unknow参数0x000082da
2020-09-18 00:34:34.923 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.022 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.062 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.121 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.170 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.194 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatImageView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.197 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.213 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.215 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatImageView是一个appcompat小部件,只能与Theme.appcompat主题(或子代)一起使用。
2020-09-18 00:34:35.224 30473-30473/com.currentmedia.punjabinews E/ThemeUtils:View类androidx.appcompat.widget.AppCompatTextView是一个只能与
2020-09-18 00:34:33.348 30473-30514/com.currentmedia.punjabinews E/cr_VariationsUtils: Failed reading seed file "/data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed": /data/user/0/com.currentmedia.punjabinews/app_webview/variations_seed (No such file or directory)
2020-09-18 00:34:33.697 30473-30553/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:33.698 30473-30553/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.255 30473-30593/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.256 30473-30593/com.currentmedia.punjabinews E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
2020-09-18 00:34:34.923 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.022 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.062 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.121 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.170 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.194 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.197 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.213 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.215 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.224 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.266 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.269 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.270 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.273 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.278 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.289 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.293 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.297 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.301 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.306 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatImageView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.308 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.313 30473-30473/com.currentmedia.punjabinews E/ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2020-09-18 00:34:35.470 30473-30596/com.currentmedia.punjabinews E/YouTubeAndroidPlayerAPI: Embed config is not supported in RemoteEmbeddedPlayer.
2020-09-18 00:34:37.997 30473-30473/com.currentmedia.punjabinews E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.currentmedia.punjabinews, PID: 30473
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
        at android.content.ComponentName.<init>(ComponentName.java:130)
        at android.content.Intent.<init>(Intent.java:5780)
        at com.currentmedia.punjabinews.channeladpater$1.onItemClickListener(channeladpater.java:47)
        at com.currentmedia.punjabinews.channeladpater$Channelviewholder.onClick(channeladpater.java:75)
        at android.view.View.performClick(View.java:6294)
        at android.view.View$PerformClick.run(View.java:24770)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2020-09-18 00:34:49.144 30473-30593/com.currentmedia.punjabinews E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -19
2020-09-18 00:34:49.145 30473-30593/com.currentmedia.punjabinews E/EGL_emulation: tid 30593: swapBuffers(552): error 0x300d (EGL_BAD_SURFACE)