본문 바로가기
반응형

Anroid2

[Android] 안드로이드_UI Thread 외부에서 UI 작업 호출하기 (feat. runOnUiThread) runOnUiThread 개념 및 사용UI Thread 외부에서 UI를 호출해 작업하려다보니 에러가 발생하는데 android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 이게 안드로이드 OS 는 UI 자원 사용을 UI Thread에서만 가능하도록 만들었기 때문에 외부에서 접근하여 작업하려다보니 생기는 에러라고 한다. 손쉽게 runOnUiThread를 이용하여 외부에서 접근하는 방법에 대해 알아보자.Activity의 runOnUiThread를 이용하여 해당 작업을 UI Thread를 호출해 작업하면 에러없이 잘 작동한다.new Thre.. 2019. 11. 23.
[Android] 안드로이드 스튜디오 에뮬레이터 실행 에러 : Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: The currently selected variant "debug" uses split APKs, but none of the 2 split apks are compati.. 오랜만에 에뮬레이터를 사용해 코드를 실행시키려 했더니 이상한 에러가 발생하며 실행이 안된다. Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: The currently selected variant "debug" uses split APKs, but none of the 2 split apks are compatible with the current device with density "420" and ABIs "x86". 구글에 쳐봐도 번역기를 돌려봐도 도저히 뭔소리인지 모르겠다. 알고보면 에러에 그대로 쓰여져 있더라 "but none of the 2 split apks" 이부분에 초점을 맞춰봤는데 .. 2019. 9. 3.
반응형
TOP