IT80 Android 애드몹 (AdMob) 추가 방법. 안드로이드 앱에 애드몹 광고를 추가해 봅시다. 참고로, 아래 애드몹의 ID/광고 단위는 테스트에 사용되는 코드입니다. 애드몹 사이트에 로그인 하여 실제 사용할 앱의 ID/광고 단위를 받은 후 변경하면 됩니다. 애드몹 종속 추가. (module gradle 파일에 추가) implementation 'com.google.android.gms:play-services-ads:20.2.0' // 애드몹 광고 안드로이드 매니페스트 파일 수정 - AndroidManifest.xml 파일에 tag 추가. - tag 안에 넣어주면 됩니다. 광고를 넣을 layout 에 추가 - 저의 경우 activity_main.xml 에 넣었습니다. 앱 실행 시 AdMob 초기화 (MainActivity 에 설정) MobileAds... 2022. 7. 4. Android Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. 오류 내용 Android 12(S) 에서 앱 실행 시 아래 에러가 발생됩니다. 2022-07-04 03:06:35.342 9455-9507/com.test.test E/AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1 Process: com.test.test, PID: 9455 java.lang.IllegalArgumentException: com.test.test: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE.. 2022. 7. 4. Android resource mipmap/ic_launcher_foreground .. not found mipmap/ic_launcher_foreground not found 오류 내용 Android Icon 이미지를 변경하는데 아래 오류가 발생된다. ERROR:D:\04.Android\Work\projectName\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:4: AAPT: error: resource mipmap/ic_launcher_foreground (aka com.test.test:mipmap/ic_launcher_foreground) not found. mipmap/ic_launcher_foreground not found 해결 방안 mipmap 폴더 내 이미지 파일 삭제 후 아이콘 이미지 재 생성하면 해결된다. (New -> Image Asset .. 2022. 6. 30. Android CAMERA_DISABLED (1): connectHelper:2116: Camera "1" disabled by policy 1. CAMERA_DISABLED 에러 내용 앱에서 카메라 실행 시 (CameraDevice.StateCallback) 아래와 같은 에러 로그가 발생됩니다. 2022-06-29 11:19:16.990 7008-7008/ E/LOG: CAMERA_DISABLED (1): connectHelper:2116: Camera "1" disabled by policy 2022-06-29 11:19:17.006 7008-7008/ E/LOG: CameraDevice.StateCallback onError 3 2. CAMERA_DISABLED 에러 증상 Android 10 이하 휴대폰에서는 정상 Android 11 이상 휴대폰에서는 비정상 3. CAMERA_DISABLED 에러 원인 Android 11 이상 단말에서는.. 2022. 6. 29. 이전 1 ··· 16 17 18 19 20 다음