4
저는 intentionService가있는 Kotlin과 약간의 스택이 새로 도입되었습니다. 매니페스트는 내 서비스에 기본 생성자가 포함되어 있지 않지만 서비스 내부에서는 오류가없고 오류가없는 오류를 표시합니다. 나는 또한 다른 변형 시도했다IntentService (kotlin)의 기본 생성자
class MyService : IntentService {
constructor(name:String?) : super(name) {
}
override fun onCreate() {
super.onCreate()
}
override fun onHandleIntent(intent: Intent?) {
}
}
:
class MyService(name: String?) : IntentService(name) {
을하지만이 서비스를 실행하려고 할 때 여전히 오류 얻을 :
java.lang.Class<com.test.test.MyService> has no zero argument constructor
을 여기
내 intentService입니다
어떤 아이디어를 Kotlin의 기본 생성자를 수정하는 방법?
감사합니다.
대단히 감사합니다! –