1. build.gradle(Module:ํ๋ก์ ํธ์ด๋ฆ.app)์ android ๋ฐ์ ์ด ์ฝ๋๋ฅผ ์ถ๊ฐ
buildFeatures {
viewBinding = true
}
2. MainActivity.kt๋ก ๊ฐ์ ์ฝ๋ ์ถ๊ฐ
class MainActivity : AppCompatActivity() {
lateinit var binding: ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
}
}
'Android' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Plugin [id: 'kotlin-android'] was not found in any of the following sources ์ค๋ฅ ํด๊ฒฐ (2) | 2021.05.23 |
---|---|
์๋๋ก์ด๋ ํ์ดํ ๋ฐ ์์ ๊ธฐ (0) | 2021.03.09 |
์๋๋ก์ด๋ ์๋ช ์ฃผ๊ธฐ (0) | 2021.02.23 |
์๋๋ก์ด๋ ์คํ๋์ค styles.xml ์์ (5) | 2021.02.07 |
์๋๋ก์ด๋ ์คํ๋์ค 4.1์์ ์์ ฏ ์์ด๋ ์ ๊ทผํ๋ ๋ฒ (0) | 2021.02.07 |