0

작업 표시 줄에 외부 라이브러리 (appcompat-v7)를 사용하는 Android 애플리케이션이 있습니다. 내 애플리케이션은 등록 활동에서 시작하여 활동에 서명하고 로그인 후 대시 보드 활동이 시작되며 탭과 스 와이프가있는 작업 표시 줄이 있습니다. 등록 활동 및 로그인 활동은 정상적으로 작동하지만 서명 버튼을 클릭하면 응용 프로그램이 제목에 오류가 있음으로 인해 충돌이 발생합니다. appcompat 라이브러리를 내 작업 공간에 추가하고 내 프로젝트에도 추가했습니다. 그래서 많은 솔루션을 확인했지만 그들 중 누구도 나를 위해 일한 적이 없습니다. 여기에 내가 한 단계가 있습니다. 여기AndroidRuntime java.lang.NoClassDefFoundError :

Added appcompat to workspace as library project as mention on developer.android page. 
Added jar files of appcompat to build path of appcompat unchecked android dependencies. 
Added appcompat library project to my project (say Project X) 
Checked all library of project X, fix project properties, clean and rebuild. 
Moved android private libraries to top on order and Export tab. 
added appcompatv7 to projects tab on Java build path. 
Still no luck :(
My order and export tab looks like this from top to bottom 
1-Android Private libraries 
2-Ksoap2-android-assembly-2.4-jar-with-dependencies.jar (Jar file is located in D:\jarfiles) 
3-android Dependencies 
4-/gen 
5-/src 
6-Android 4.4.2 

이 이벤트

Intent dashboardintent = new Intent(getApplicationContext(), DashBoard.class); 
startActivity(dashboardintent); 
finish(); 

enter image description here enter image description here

로그인 고양이

의 OnClick 로그인입니다

<application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/CustomActionBarTheme" > 
     <activity 
      android:name="com.example.appname.registration.Register" (only com.example.appname is replaced with original name of application when posted on SO) 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".registration.SignIn"></activity> 
     <activity android:name="DashBoard"></activity> 
    </application> 

매니페스트입니다

01-28 14:09:14.942: E/AndroidRuntime(658): FATAL EXCEPTION: main 
01-28 14:09:14.942: E/AndroidRuntime(658): java.lang.NoClassDefFoundError: com.example.appname.DashBoard 
01-28 14:09:14.942: E/AndroidRuntime(658): at com.example.appname.registration.SignIn$1.onClick(SignIn.java:59) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.view.View.performClick(View.java:2485) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.view.View$PerformClick.run(View.java:9080) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.os.Handler.handleCallback(Handler.java:587) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.os.Handler.dispatchMessage(Handler.java:92) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.os.Looper.loop(Looper.java:123) 
01-28 14:09:14.942: E/AndroidRuntime(658): at android.app.ActivityThread.main(ActivityThread.java:3683) 
01-28 14:09:14.942: E/AndroidRuntime(658): at java.lang.reflect.Method.invokeNative(Native Method) 
01-28 14:09:14.942: E/AndroidRuntime(658): at java.lang.reflect.Method.invoke(Method.java:507) 
01-28 14:09:14.942: E/AndroidRuntime(658): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 
01-28 14:09:14.942: E/AndroidRuntime(658): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 
01-28 14:09:14.942: E/AndroidRuntime(658): at dalvik.system.NativeStart.main(Native Method) 
01-28 14:09:16.602: I/Process(658): Sending signal. PID: 658 SIG: 9 
+0

프로젝트 속성에서 appcompat7을 라이브러리로 설정 했습니까? – Mathew

+0

@Mathew 예 했어요. – MajorGeek

+0

오류 로그를 게시 할 수 있습니까? – Mathew

답변

0

enter image description here 확인 매니페스트에서 클래스 이름 앞에 Java Build Path

+0

수정 된 질문 확인 및 제안 – MajorGeek

0

접두어 점에서 Order and Export 탭의 라이브러리입니다. 이 클래스가 특정 패키지에있는 경우 매니페스트에 언급하십시오.

<activity android:name=".DashBoard"></activity> 

이것이 문제인지 확인하십시오.

+0

위 라인을 com.example.packagename.DashBoard 로 변경했습니다. 프로젝트 속성을 정리하고 다시 작성하십시오. 여전히 동일합니다 – MajorGeek

+0

libs 폴더 안에 Ksoap2-android-assembly-2.4-jar-with-dependencies.jar를 추가 했습니까? 또한 매니페스트 파일에서 언급하는 것을 잊어 버린 다른 라이브러리를 사용하고 있습니까? – Mathew

+0

Ksoap2-android-assembly-2.4-jar-with-dependencies.jar은 libs forlder 아래에 있지 않지만 참조 된 Libries 아래에 있습니다. 내 libs 폴더에 android-support-v4.jar가 있습니다. – MajorGeek

0

실행하기 전에 bin 폴더를 삭제하십시오. 이 문제가있어서 저에게 저장된 bin 폴더를 삭제하십시오.

관련 문제