마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 gcm 다른 오류가떴는데 어떻게고쳐야될지...(초보)

0 추천

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources
Failed to generate resource table for split ''
C:\Users\kkk\AndroidStudioProjects\GCMGCM\app\src\main\res\values\refs.xml


Error:(3, 21) String types not allowed (at 'ic_stat_ic_notification' with value '').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\kkk\AppData\Local\Android\sdk1\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1


Information:BUILD FAILED
Information:Total time: 8.039 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console

2가지 오류가 뜨는데 어떻게 고치면되나요?

class에 뜨는오류는

R.string.gcm_defaultSenderId
R.drawable.ic_stat_ic_notification
이 부분에서 R만 빨간줄로 떠요 
어떻게 고치면되는지 가르쳐주시면 감사하겠습니다. 아직 초보라 잘 모르겠네요
진조허접 (340 포인트) 님이 2015년 11월 26일 질문
잘은 모르겠는데요...

google-services.json 파일이 app 폴더내에 없으면 저런 에러가 날 수 있다고 하네요.
그 파일은 이미 app폴더에 넣었는데도 그러네요 ㅠㅠ
그럼 혹시

Add the dependency to your project-level build.gradle:

classpath 'com.google.gms:google-services:1.5.0-beta2'
Add the plugin to your app-level build.gradle:

apply plugin: 'com.google.gms.google-services'

이 내용은요?

https://developers.google.com/cloud-messaging/android/client
추가했는데안되네요 ㅠㅠ
다른질문인데 이거는
import com.google.android.gcm.GCMRegistrar;
예를들어 저걸 위에 넣는다치면 android에서 렉이걸리네요 ㅠㅠ
설치할거 다했는데...머가문젠지
혹시 gcm.jar 사용하시나요?
푸시 구현을 play-service 라이브러리가 아닌 gcm.jar로 사용하고 계신듯 하네요.
관련 라이브러리가 있는지 확인해보셔야 할듯 합니다.

1개의 답변

0 추천

Error:(3, 21) String types not allowed (at 'ic_stat_ic_notification' with value '').

라고 로그에 나왔으니 ic_stat_ic_notification 이 부분에 대해서 확인해 봐야죠

R.drawable.ic_stat_ic_notification

저 파일이 png형태의 이미지로 drawable 폴더에 들어있나요? 로그에서는 스트링 형태라고 나오는데요

cc1232 (35,280 포인트) 님이 2015년 11월 27일 답변
...