android.app.Application cannot be cast to android.app.Activity

后端 未结 5 1812
日久生厌
日久生厌 2020-11-28 09:33

I\'m trying to change a LinearLayout from another class, but when i run this code:

public class IRC extends PircBot {

ArrayList c         


        
5条回答
  •  悲哀的现实
    2020-11-28 10:25

    In my case, when I'm in an activity that extends from AppCompatActivity, it did not work(Activity) getApplicationContext (), I just putthis in its place.

提交回复
热议问题