2016-07-16 4 views
1

manish.tiw.android.example.activitywrapper를 가져 오는 중입니다. android.app.ContextImpl 브로드 캐스트 수신기를 사용하여 네트워크 연결 상태를 수신 대기하려고 시도하는 런타임 예외입니다. 이걸로 나를 도울 수 있니? 스택 트레이스는 -브로드 캐스트 수신기를 사용할 때의 오류

java.lang.RuntimeException: Unable to start receiver com.amazonaws.cognito.sync.demo.NetworkChangeReceiver: java.lang.ClassCastException: manish.tiw.android.example.activitywrapper cannot be cast to android.app.ContextImpl 
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2452) 
at android.app.ActivityThread.access$1600(ActivityThread.java:150) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:5283) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 
at dalvik.system.NativeStart.main(Native Method) 
+0

show onReceive 메소드 코드 –

답변

1

내가, 대신 내 안드로이드 manifest.xml 파일에 수신기를 등록, 신고 및 사용자 정의 응용 프로그램 클래스에 등록 GitHub의 블로그에서 문제에 대한 해결책을 발견했다. 그것은 그 문제를 해결했습니다.

관련 문제