0
votes

When I try to write a service with Kotlin

package com.personal.distribute.service

import android.app.Service
import android.content.Intent
import android.os.IBinder

class MyService : Service() {

    override fun onBind(intent: Intent): IBinder {
        return null
    }
}

I got some compile errors like that

e: F:\FastAppStory\android\quickappsdk\src\main\java\com\psersonal\distribute\service\MyService.kt: (7, 1): Class 'MyService' is not abstract and does not implement abstract base class member public abstract fun getBasePackageName(): String! defined in android.app.Service

I did not find the corresponding possible problem, can anyone help? Thank you very much

1
gradle build version is 4.0.1. gradle is 6.3. - Kirin_CN

1 Answers

0
votes

The cause of this error is that a local library to CompileOnly overwrites the Context... Cause the problem