Android 5.0 (L) Service Intent must be explicit in Google analytics

后端 未结 11 1660
南旧
南旧 2020-11-29 02:01

My code worked in <5 but in Android 5.0 I\'m running into an issue that I don\'t quite understand.

10-23 10:18:18.945: E/AndroidRuntime(8987): java.lang.I         


        
11条回答
  •  醉话见心
    2020-11-29 02:12

    This worked for me..This worked in lollipop using android sdk 21..

    Intent intent = new Intent(this, Class.forName(ServiceClassName.class.getName()));
    bindService(intent,serviceConnection, Service.BIND_AUTO_CREATE);
    

提交回复
热议问题