我在上传图片是遇到了这个问题,我调用的是一个开源库的包,
net.gotev:uploadservice:3.4.2
本来还是可以上传图片的,我升级了一下这个包,就不能上传图片报这个错误
java.lang.IllegalArgumentException: Android Oreo requires a notification configuration for the service to run. https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)
搞了好久,才发现是包的问题,改成:net.gotev:uploadservice:3.4.1就可以了。
猜测应该是系统的问题,在新的版本在Android Oreo中要弄一个通知配置,具体怎么弄的我还不知道,新手。