작업 표시 줄에 외부 라이브러리 (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();
로그인 고양이
의 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
프로젝트 속성에서 appcompat7을 라이브러리로 설정 했습니까? – Mathew
@Mathew 예 했어요. – MajorGeek
오류 로그를 게시 할 수 있습니까? – Mathew