Android Kotlin界面
我有两个模块管理器和屏幕。 管理器使用屏幕现在我创建了一个名为EventListener
屏幕内的新界面当我在Manager模块内部实现EventListener
我得到错误
错误:以下类的超types无法解析。 请确保您在类路径中具有所需的依赖关系:class whitelable.rapyd.com.rapydwlmanager.RapydManager,unresolved supertypes:whitelable.rapyd.com.rapydwlscreens.EventsListener
这是我的代码:
RapydManager constructor(mContext : Context) : BaseRapydManager(mContext) , EventsListener { override fun onEventDispatched(str: String) { TODO("not implemented") //To change body of created functions use File | Settings | File Templates. } // override fun onEventDispatched(str: String) { // screenManager.launchActivity(ActivityB::class.java,null) // } }
我尝试干净,干净的缓存,重建,删除生成目录…它does not’t工作我能做什么?
这是我的阶梯:
android { compileSdkVersion 26 defaultConfig { minSdkVersion 20 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation project(':rapydwlscreens') implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" } apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 26 defaultConfig { minSdkVersion 20 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:design:26.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation project(':rapydwlmanager') }
你能帮忙吗?