kotlin Cannot inherit from final xxxx 的解决
2017-05-18 18:18
585 查看
kotlin使用的时候发现继承这块和java有区别。 直接继承生成的单独类的时候,需要在被继承的class前面加open修饰才行,要不会报错Cannot inherit from final xxxx
例:
例:
open class BaseActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) } }
相关文章推荐
- HTTP POST Client 出现Cannot inherit from final class
- 使用httpClient的post发送数据时候错误:cannot inherit from final class
- Caused by: java.lang.VerifyError: Cannot inherit from final class
- 调实JSPDEV的时候遇到了问题Cannot inherit from final class
- 使用paoding lucene分词 ,遇到java.lang.VerifyError: Cannot inherit from final class 问题
- rcp(插件开发)The type XXX cannot be resolved. It is indirectly referenced from required .class files解决办法
- 解决jdk8之The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .
- The final local variable cannot be assigned, since it is defined in an enclosing type的解决办法(把变量从局部编程)
- rcp(插件开发)The type XXX cannot be resolved. It is indirectly referenced from required .class files解决办法
- 解决问题: ----- The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from
- cannot convert parameter 5 from 'char [64]' to 'unsigned char *解决办法
- 解决“User breakpoint called from code at XXXX”Bug
- 解决“Row cannot be located for updating. Some values may have been changed since it was last read.”的问题
- 如何解决 " HEAP: Free Heap block xxxxxxxx modified at xxxxxxxx after it was freed "
- The type org.eclipse.core.commands.common.EventManager cannot be resolved. It is indirectly referenced from required .class file
- 连接数据库发生异常com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primar
- internet explorer cannot display image picture from google group?我的问题就这么解决了View > Encoding >
- ADODB使用excel的"Cannot modify the design of table 'xxxx'. It is in a read-only database"的问题
- multiple inheritance 的问题 diamond inheritance,及解决办法 virtual inherit
- (菜鸟级别)解决用VC创建新线程易出的问题error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (_