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

앱에서 확장 파일 다운로드 관련

0 추천

확장 파일 다운로드 테스트를 진행 중입니다.

알바 테스트로 apk와 확장 파일을 등록해놓은 상태입니다.

확장 파일을 다운로드 받는 소스는 샘플 소스를 이용하여 아래와같이 사용중데

앱을 실행하면 자꾸 앱이 죽어버리는 현상때문에 미치겠습니다 ㅜㅜ

[ 다운로드 소스]

if(!expansionFilesDelivered()){

Intent launcher = getIntent();

Intent fromNotification = new Intent(Intro.this, getClass());

fromNotification.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TOP);

fromNotification.setAction(launcher.getAction());

if(launcher.getCategories() != null){

for(String cat : launcher.getCategories()){

fromNotification.addCategory(cat);

}

}

PendingIntent pIntent = PendingIntent.getActivity(Intro.this, 0, fromNotification, PendingIntent.FLAG_UPDATE_CURRENT);

 

try{

int result = DownloaderClientMarshaller.startDownloadServiceIfRequired(Intro.this, pIntent, ExpansionFileDownloaderService.class);

if(DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED != result){

mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this, ExpansionFileDownloaderService.class);

Toast.makeText(getApplicationContext(), "다운로드 중", Toast.LENGTH_SHORT).show();

 

}

}catch(NameNotFoundException e){

e.printStackTrace();

}

}

 

[에러 로그]

10-16 19:08:58.725: E/AndroidRuntime(10236): java.lang.NoClassDefFoundError: com.android.vending.expansion.downloader.R$string
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.Helpers.getDownloaderStringResourceIDFromState(Helpers.java:268)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.impl.DownloadNotification.onDownloadStateChanged(DownloadNotification.java:106)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.google.android.vending.expansion.downloader.impl.DownloaderService$LVLRunnable.run(DownloaderService.java:752)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Handler.handleCallback(Handler.java:733)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Handler.dispatchMessage(Handler.java:95)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.os.Looper.loop(Looper.java:157)
10-16 19:08:58.725: E/AndroidRuntime(10236): at android.app.ActivityThread.main(ActivityThread.java:5356)
10-16 19:08:58.725: E/AndroidRuntime(10236): at java.lang.reflect.Method.invokeNative(Native Method)
10-16 19:08:58.725: E/AndroidRuntime(10236): at java.lang.reflect.Method.invoke(Method.java:515)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
10-16 19:08:58.725: E/AndroidRuntime(10236): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
10-16 19:08:58.725: E/AndroidRuntime(10236): at dalvik.system.NativeStart.main(Native Method)
 

어디서 뭐때문에 앱이 종료되는지 모르겠습니다.

확장파일 다운로드 경험 있으신분들의 도움을 청합니다 .!!

 

lms99 (140 포인트) 님이 2014년 10월 16일 질문

1개의 답변

0 추천

해당 오류 코드를 검색해보세요 java.lang.NoClassDefFoundError:

 

 

aucd29 (218,390 포인트) 님이 2014년 10월 16일 답변
...