Permission denied for window type 2002 in Android Studio

前端 未结 4 1936
礼貌的吻别
礼貌的吻别 2020-12-30 02:46

Today I installed latest version of Android Studio

I am learning Floating Widgets in Android

I started with applying this example

https://www.spaceot

4条回答
  •  既然无缘
    2020-12-30 03:19

    This is occurring because the targetSdkVersion in the example and your targetSdkVersion are different. Use the flag TYPE_APPLICATION_OVERLAY instead of TYPE_PHONE in WindowManager.LayoutParams:

    WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY 
    

提交回复
热议问题