我正在尝试在Eclipse上学习Android开发的一些基本概念,在创建一些简单的应用程序时,我开始遇到库工作方式的问题。
当我第一次安装Eclipse并按照指南创建第一个应用程序时,它工作正常,但在第二个项目之后,我运行的所有内容在启动时崩溃(即使它是一个空白的应用程序)。
我最初可以找到的唯一区别是,在可以工作的项目中,“android-support-v7-appcompat.jar”和“android-support-v4.jar”库位于Android Private Libraries文件夹中当我开始另一个项目时,我必须从adt bundle文件夹中手动添加这些库,但是它们显示为Referenced Libraries,我假设通过读取日志导致应用程序崩溃(错误提到了这些库名称)。 / p>
如何在Android Private Libraries文件夹中获取库?或者也许还有什么可能导致这种情况?
11-30 14:01:13.386: E/Trace(13741): error opening trace file: No such file or directory (2)
11-30 14:01:13.386: D/ActivityThread(13741): setTargetHeapUtilization:0.25
11-30 14:01:13.386: D/ActivityThread(13741): setTargetHeapIdealFree:8388608
11-30 14:01:13.386: D/ActivityThread(13741): setTargetHeapConcurrentStart:2097152
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowActionBar
11-30 14:01:13.436: W/dalvikvm(13741): VFY: unable to resolve static field 2914 (Theme_windowActionBar) in Landroid/support/v7/appcompat/R$styleable;
11-30 14:01:13.436: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x000a
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowActionBar
11-30 14:01:13.436: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b62 at 0x1d in Landroid/support/v7/app/ActionBarActivityDelegate;.onCreate
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowActionBarOverlay
11-30 14:01:13.436: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b63 at 0x27 in Landroid/support/v7/app/ActionBarActivityDelegate;.onCreate
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowActionModeOverlay
11-30 14:01:13.436: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b64 at 0x31 in Landroid/support/v7/app/ActionBarActivityDelegate;.onCreate
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_android_windowIsFloating
11-30 14:01:13.436: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b5c at 0x3b in Landroid/support/v7/app/ActionBarActivityDelegate;.onCreate
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedWidthMajor
11-30 14:01:13.436: W/dalvikvm(13741): VFY: unable to resolve static field 2919 (Theme_windowFixedWidthMajor) in Landroid/support/v7/appcompat/R$styleable;
11-30 14:01:13.436: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x000c
11-30 14:01:13.436: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$attr;.actionBarTheme
11-30 14:01:13.436: W/dalvikvm(13741): VFY: unable to resolve static field 2242 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
11-30 14:01:13.436: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x001a
11-30 14:01:13.456: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$color;.abc_input_method_navigation_guard
11-30 14:01:13.456: W/dalvikvm(13741): VFY: unable to resolve static field 2361 (abc_input_method_navigation_guard) in Landroid/support/v7/appcompat/R$color;
11-30 14:01:13.456: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x0061
11-30 14:01:13.456: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$attr;.actionBarTheme
11-30 14:01:13.456: W/dalvikvm(13741): VFY: unable to resolve static field 2242 (actionBarTheme) in Landroid/support/v7/appcompat/R$attr;
11-30 14:01:13.456: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x0019
11-30 14:01:13.456: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$layout;.abc_screen_simple_overlay_action_mode
11-30 14:01:13.456: W/dalvikvm(13741): VFY: unable to resolve static field 2590 (abc_screen_simple_overlay_action_mode) in Landroid/support/v7/appcompat/R$layout;
11-30 14:01:13.456: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x00d4
11-30 14:01:13.456: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$layout;.abc_screen_simple
11-30 14:01:13.456: W/dalvikvm(13741): VFY: unable to resolve static field 2589 (abc_screen_simple) in Landroid/support/v7/appcompat/R$layout;
11-30 14:01:13.456: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x00f6
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$id;.action_mode_bar_stub
11-30 14:01:13.466: W/dalvikvm(13741): VFY: unable to resolve static field 2514 (action_mode_bar_stub) in Landroid/support/v7/appcompat/R$id;
11-30 14:01:13.466: D/dalvikvm(13741): VFY: replacing opcode 0x60 at 0x00db
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedWidthMajor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b67 at 0x1b in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedWidthMinor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b68 at 0x20 in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedWidthMinor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b68 at 0x2f in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedHeightMajor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b65 at 0x34 in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedHeightMajor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b65 at 0x43 in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedHeightMinor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b66 at 0x48 in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$styleable;.Theme_windowFixedHeightMinor
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0b66 at 0x57 in Landroid/support/v7/app/ActionBarActivityDelegateBase;.applyFixedSizeWindow
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$layout;.abc_screen_toolbar
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x0a1f at 0x2f in Landroid/support/v7/app/ActionBarActivityDelegateBase;.ensureSubDecor
11-30 14:01:13.466: D/dalvikvm(13741): DexOpt: couldn't find static field Landroid/support/v7/appcompat/R$id;.decor_content_parent
11-30 14:01:13.466: I/dalvikvm(13741): DexOpt: unable to optimize static field ref 0x09d9 at 0x3b in Landroid/support/v7/app/ActionBarActivityDelegateBase;.ensureSubDecor
11-30 14:01:13.466: D/AndroidRuntime(13741): Shutting down VM
11-30 14:01:13.466: W/dalvikvm(13741): threadid=1: thread exiting with uncaught exception (group=0x41376378)
11-30 14:01:13.476: E/AndroidRuntime(13741): FATAL EXCEPTION: main
11-30 14:01:13.476: E/AndroidRuntime(13741): java.lang.NoSuchFieldError: android.support.v7.appcompat.R$styleable.Theme_windowActionBar
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:149)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:138)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123)
11-30 14:01:13.476: E/AndroidRuntime(13741): at com.example.mtgcontador0_001.MenuContador0_001.onCreate(MenuContador0_001.java:15)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.Activity.performCreate(Activity.java:5008)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.ActivityThread.access$600(ActivityThread.java:138)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.os.Handler.dispatchMessage(Handler.java:99)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.os.Looper.loop(Looper.java:213)
11-30 14:01:13.476: E/AndroidRuntime(13741): at android.app.ActivityThread.main(ActivityThread.java:4787)
11-30 14:01:13.476: E/AndroidRuntime(13741): at java.lang.reflect.Method.invokeNative(Native Method)
11-30 14:01:13.476: E/AndroidRuntime(13741): at java.lang.reflect.Method.invoke(Method.java:511)
11-30 14:01:13.476: E/AndroidRuntime(13741): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
11-30 14:01:13.476: E/AndroidRuntime(13741): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
11-30 14:01:13.476: E/AndroidRuntime(13741): at dalvik.system.NativeStart.main(Native Method)