How to Get Package Name of Source Class File in Android ?

前端 未结 5 2194
礼貌的吻别
礼貌的吻别 2020-12-17 18:55

I am using only one project to port lite and full versions for that I am just updating Manifest file package names.

My project structure is like this

My Ap

5条回答
  •  有刺的猬
    2020-12-17 19:49

    String packageName = this.getClass().getPackage().getName();
    

    will work definitely.

提交回复
热议问题