android,kotlin2021. 10. 26. 15:54

[kotlin] not build viewbinding 해결방법

 

처음에 프로젝트 만들었는데 viewbing 이 안된다...

 

할려면 bundle.gradle에서 

 

buildFeatures {
viewBinding true
}

 

설정하면 사용가능하다..

Posted by thdeodls85
android,kotlin2021. 10. 6. 18:54

[kotlin]Must be called from main thread of fragment host해결방법

 

onbackpressed 할려고 했더니.. 크래쉬가 난다..

 

val timer = Timer()
timer.schedule(object : TimerTask()
{
override fun run() {
onBackPressed()
}
} , 2000)

 

runOnUiThread {
onBackPressed()

 

바꿔주면 메인 쓰레드에서 동작

Posted by thdeodls85
android,kotlin2021. 9. 28. 11:44

[kotlin] date custome formmater 방법

 

val current = LocalDateTime.now()
val formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm")

val date = current.format(formatter)

Posted by thdeodls85
android,kotlin2021. 9. 23. 10:39

Missing contentDescription attribute on image 해결 방법

 

android:contentDescription="@string/fail_load_image"

 

content의 부가 설명을 넣어준다.. 

Posted by thdeodls85
android,kotlin2021. 3. 15. 11:37

[kotlin]webview errr_access_Denied 해결방법

 

https 쓸려고 햇더니 denied 걸렸다..

 

<application
android:usesCleartextTraffic="true"

</application>

 

<uses-permission android:name="android.permission.INTERNET" />

 

이 두개를 설정하고 앱 지우고 다시 시작해야 제대로 적용된다.

Posted by thdeodls85
android,kotlin2020. 1. 31. 10:48

Instant Run is not supported on devices with API levels 20 or lower. 해결방법

 

module -> app -> defaulfConfig -> minSdkVersion 20 

Posted by thdeodls85
android,kotlin2020. 1. 31. 10:47

Otherwise check for a confirmation dialog on your device. Error while Installing APK issue 해결방법

 

manifests -> android:debuggable="true"

Posted by thdeodls85