
Android
l3142600073
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Android Studio Gradle: Please remove usages of `jcenter()` Maven repository from your build scripts
打开App/Gradle Scripts/build.gradle(Project:---) Change the 'jcenter()' on build script{} and in all project repositories. and Sync now. 更改之前: buildscript { repositories { google() jcenter() } dependencies { classpa...原创 2021-06-06 11:16:47 · 7695 阅读 · 3 评论 -
Android Kotlin 接口函数
1 调用接口中的函数 //Person.kt package com.example.xhello import android.app.Person open class Person (val name: String, val age: Int){ } 首先创建一个Study 接口,并在其中定义几个学习行为. 右击com.example.xhello包->NEW->kotlin File/Class 在弹出对话框中输入"Study", 创建 类型选择"Interface" //S原创 2020-06-22 23:05:15 · 475 阅读 · 0 评论 -
Android Kotlin继承
1 子类采用主构造函数 //Person.kt package com.example.xhello import android.app.Person open class Person { var name = "" var age = 0 fun eat() { println(name + "is eating. He is + " + age + "years old.") } } //Student.kt import android.ap原创 2020-06-22 22:44:28 · 277 阅读 · 0 评论 -
Android 面向对象编程 类与对象
首先创建一个 person 类, 右击 com.example.xhello包 ->Kotlin File/Class, 在 弹出框中输入"Person". 对话在默认情况下自动创建一个 File, File 通常用于编写Kotlin 顶层函数和扩展函数,可以点击展开下拉列表进行切换, 如下图: 参考:<<第一行代码>> 第三版 ...原创 2020-06-21 18:10:21 · 583 阅读 · 0 评论