将工作eclipse项目导入到新版本

时间:2012-12-14 00:32:56

标签: android eclipse import

我安装了日食Helios,但由于违反许可证,我无法安装插件。我卸载了Java SDK 1.7,删除了Eclipse文件夹,并下载了eclipse JUNO(应该是最新版本)。我已经在Windows上安装了Android sdk,但是,看起来Eclipse在导入后只是在其他目录中第二次安装它。

我的问题是,我正在导入一个现有项目,(新的其他..从源代码构建Android项目)并且没有编译错误。一旦我运行程序,我得到这个ErrorLog:

12-14 00:06:39.906: E/AndroidRuntime(668): FATAL EXCEPTION: main

12-14 00:06:39.906: E/AndroidRuntime(668): java.lang.RuntimeException: Unable to start activity ComponentInfo{xxxxname.xnamepre.xnamepre2012/xxxxname.xnamepre.xnamepre2012.SplashScreen}: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v7.widget.Space

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread.access$600(ActivityThread.java:123)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.os.Handler.dispatchMessage(Handler.java:99)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.os.Looper.loop(Looper.java:137)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread.main(ActivityThread.java:4424)

12-14 00:06:39.906: E/AndroidRuntime(668):  at java.lang.reflect.Method.invokeNative(Native Method)

12-14 00:06:39.906: E/AndroidRuntime(668):  at java.lang.reflect.Method.invoke(Method.java:511)

12-14 00:06:39.906: E/AndroidRuntime(668):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

12-14 00:06:39.906: E/AndroidRuntime(668):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

12-14 00:06:39.906: E/AndroidRuntime(668):  at dalvik.system.NativeStart.main(Native Method)

12-14 00:06:39.906: E/AndroidRuntime(668): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v7.widget.Space

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)

12-14 00:06:39.906: E/AndroidRuntime(668):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.Activity.setContentView(Activity.java:1835)

12-14 00:06:39.906: E/AndroidRuntime(668):  at xxxxname.xnamepre.xnamepre2012.SplashScreen.onCreate(SplashScreen.java:30)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.Activity.performCreate(Activity.java:4465)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

12-14 00:06:39.906: E/AndroidRuntime(668):  ... 11 more

12-14 00:06:39.906: E/AndroidRuntime(668): Caused by: java.lang.ClassNotFoundException: 
android.support.v7.widget.Space

12-14 00:06:39.906: E/AndroidRuntime(668):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

12-14 00:06:39.906: E/AndroidRuntime(668):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

12-14 00:06:39.906: E/AndroidRuntime(668):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.createView(LayoutInflater.java:552)

12-14 00:06:39.906: E/AndroidRuntime(668):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)

12-14 00:06:39.906: E/AndroidRuntime(668):  ... 21 more

在线SplashScreen.java:30代表setContentView(R.layout.splashscreen);我没有触及文件。在res/layout文件夹中是splashscreen.xml文件。

另外,如何将虚拟Android设备管理器的迷你图标添加回工具栏?

1 个答案:

答案 0 :(得分:0)

android sdk目前仅支持jdk 1.6。另外,您可以在此处找到有关为eclipse安装adt插件的说明:http://developer.android.com/tools/sdk/eclipse-adt.html