본문 바로가기
728x90
반응형

Programming/Android5

[admob] There was a problem getting an ad response. ErrorCode: 2 There was a problem getting an ad response. ErrorCode: 2 위 에러는 해당 디바이스의 날짜나 시간이 잘못되었을 때 발생한다. 네트워크를 통해 자동으로 시간을 맞춘뒤 다시 실행하면 정상 실행된다. 2018. 8. 1.
Execution failed for task 'app:mergeDebugResources' Crunching Cruncher gradle 빌드 중 아래와 같은 에러가 발생 한다면 Execution failed for task 'app:mergeDebugResources' Crunching Cruncher1. drawable-ldpi, drawable-hdpi, drawable-mdpi, drawable-xhdpi 폴더에서 정상적으로 import 되지 않은 이미지 리소스가 있는지 찾는다.2. 이미지 리소스 미리보기 창에 손상된 파일이 있을 경우, 해당 파일을 삭제 후 다시 해당 폴더로 이미지를 복사 한다.3. 빌드를 다시 시작한다. 2016. 10. 15.
layout에 view 동적으로 생성하기 (Add imageView and textView to linearLayout programmatically) 1. textView 동적 생성 // textView가 추가될 linearLayoutLinearLayout layout = (LinearLayout) layout.findViewById(R.id.linearLayout); // layout param 생성LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT /* layout_width */, LayoutParams.WRAP_CONTENT /* layout_height */, 1f /* layout_weight */); TextView tv = new TextView(this); // 새로 추가할 textView 생성tv.setText("new TextView"); // textVie.. 2016. 9. 22.
Unable to build apk: The number of method references cannot exceed 64K build.gradle 파일 내 defaultConfig 에 multiDexEnabled true 를 입력하면 해결 12345678910111213141516171819android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.gkwak.***" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true // 이곳에 추가 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android... 2016. 9. 16.
728x90
반응형