nakka soft world !
[안드로이드] startActivity시 Type mismatch: Required: Context, Found: Intent 본문
프로그래밍언어/안드로이드(Android)
[안드로이드] startActivity시 Type mismatch: Required: Context, Found: Intent
nakka 2020. 9. 5. 10:50728x90
startActivity를 했더니 아래 와같이 Type mismatch가 발생하면서 Context를 넣어야 하는데, Intent를 넣으란다.
Type mismatch.
Required: Context
Found: Intent
사실 동일 App 코드의 다른 부위에서 카피한건데. 갑자기 왜?!
이럴땐 구글링이지~ 구글링을 해보니 아래와 같이 startActivity를 context에 있는 startActivity를 호출 해주면된다.
너무 간단. 그럼 즐 코딩~
728x90
'프로그래밍언어 > 안드로이드(Android)' 카테고리의 다른 글
[Android] The emulator process for AVD has terminated (0) | 2022.05.17 |
---|---|
[안드로이드] Fragment에서 context나 activity를 가져오는 방법 (0) | 2020.09.02 |
[Android] 앱 설치 여부 확인 (0) | 2015.08.09 |
String to Boolean (0) | 2015.05.06 |
[Android] 상단바 없애기 (0) | 2015.03.15 |
Comments