Eclipse昨天崩溃了,现在到处都是错误

时间:2014-04-13 17:05:08

标签: java android eclipse

昨天,Eclipse在开发Android应用程序时崩溃,从那以后我无法构建任何有效的东西。我创建的程序要么是空白屏幕,要么在几秒钟内崩溃。我一直无法充气,无法在LogCat中启动活动错误。我尝试重新安装ADT,Android Studio和Java SDK,我在各处都遇到了同样的错误。所有这个程序应该是从Splash屏幕转到空活动。好像崩溃在我的Mac上杀死了Android。谢谢你的帮助。

activity_splash.html

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/start"
    tools:context="com.clintonmedbery.natureapp.Splash"
    tools:ignore="MergeRootFrame" />

Splash.java

package com.clintonmedbery.natureapp;

import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;
import android.os.Handler;

public class Splash extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);

    final Handler handler = new Handler();
    handler.postDelayed(new Runnable() {
        public void run() { 
            Intent intent = new Intent(Splash.this, MainActivity.class);
            startActivity(intent);
            finish();
        }
        //Pause time for our main opening logo.
    }, 3000);

    if (savedInstanceState == null) {
        getSupportFragmentManager().beginTransaction()
                .add(R.id.container, new PlaceholderFragment())
                .commit();
    }
}


@Override
public boolean onCreateOptionsMenu(Menu menu) {

    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.splash, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        return true;
    }
    return super.onOptionsItemSelected(item);
}

/**
 * A placeholder fragment containing a simple view.
 */
public static class PlaceholderFragment extends Fragment {

    public PlaceholderFragment() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_splash, container, false);
        return rootView;
    }
}

}

logcat的

04-13 12:50:53.004: E/ActivityThread(1397): Failed to inflate
04-13 12:50:53.004: E/ActivityThread(1397): android.view.InflateException: Binary XML file           line #1: Error inflating class <unknown>
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.createView(LayoutInflater.java:518)
04-13 12:50:53.004: E/ActivityThread(1397):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:138)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
04-13 12:50:53.004: E/ActivityThread(1397):     at com.clintonmedbery.natureapp.Splash.onCreate(Splash.java:21)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.os.Looper.loop(Looper.java:130)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.app.ActivityThread.main(ActivityThread.java:3835)
04-13 12:50:53.004: E/ActivityThread(1397):     at java.lang.reflect.Method.invokeNative(Native Method)
04-13 12:50:53.004: E/ActivityThread(1397):     at java.lang.reflect.Method.invoke(Method.java:507)
04-13 12:50:53.004: E/ActivityThread(1397):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
04-13 12:50:53.004: E/ActivityThread(1397):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
04-13 12:50:53.004: E/ActivityThread(1397):     at dalvik.system.NativeStart.main(Native Method)
04-13 12:50:53.004: E/ActivityThread(1397): Caused by: java.lang.reflect.InvocationTargetException
04-13 12:50:53.004: E/ActivityThread(1397):     at java.lang.reflect.Constructor.constructNative(Native Method)
04-13 12:50:53.004: E/ActivityThread(1397):     at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.LayoutInflater.createView(LayoutInflater.java:505)
04-13 12:50:53.004: E/ActivityThread(1397):     ... 21 more
04-13 12:50:53.004: E/ActivityThread(1397): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
04-13 12:50:53.004: E/ActivityThread(1397):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.content.res.Resources.loadDrawable(Resources.java:1785)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.View.<init>(View.java:1972)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.view.ViewGroup.<init>(ViewGroup.java:292)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.widget.FrameLayout.<init>(FrameLayout.java:88)
04-13 12:50:53.004: E/ActivityThread(1397):     at android.widget.FrameLayout.<init>(FrameLayout.java:84)
04-13 12:50:53.004: E/ActivityThread(1397):     ... 24 more
04-13 12:50:53.024: D/AndroidRuntime(1397): Shutting down VM
04-13 12:50:53.024: W/dalvikvm(1397): threadid=1: thread exiting with uncaught exception (group=0x401b2560)
04-13 12:50:53.034: E/AndroidRuntime(1397): FATAL EXCEPTION: main
04-13 12:50:53.034: E/AndroidRuntime(1397): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.clintonmedbery.natureapp/com.clintonmedbery.natureapp.Splash}: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1768)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.os.Looper.loop(Looper.java:130)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread.main(ActivityThread.java:3835)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at java.lang.reflect.Method.invokeNative(Native Method)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at java.lang.reflect.Method.invoke(Method.java:507)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at dalvik.system.NativeStart.main(Native Method)
04-13 12:50:53.034: E/AndroidRuntime(1397): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.createView(LayoutInflater.java:518)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:138)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at com.clintonmedbery.natureapp.Splash.onCreate(Splash.java:21)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1722)
04-13 12:50:53.034: E/AndroidRuntime(1397):     ... 11 more
04-13 12:50:53.034: E/AndroidRuntime(1397): Caused by: java.lang.reflect.InvocationTargetException
04-13 12:50:53.034: E/AndroidRuntime(1397):     at java.lang.reflect.Constructor.constructNative(Native Method)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.LayoutInflater.createView(LayoutInflater.java:505)
04-13 12:50:53.034: E/AndroidRuntime(1397):     ... 21 more
04-13 12:50:53.034: E/AndroidRuntime(1397): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.content.res.Resources.loadDrawable(Resources.java:1785)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.View.<init>(View.java:1972)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.view.ViewGroup.<init>(ViewGroup.java:292)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.widget.FrameLayout.<init>(FrameLayout.java:88)
04-13 12:50:53.034: E/AndroidRuntime(1397):     at android.widget.FrameLayout.<init>(FrameLayout.java:84)
04-13 12:50:53.034: E/AndroidRuntime(1397):     ... 24 more
04-13 12:50:53.044: W/ActivityManager(182):   Force finishing activity com.clintonmedbery.natureapp/.Splash
04-13 12:50:53.545: W/ActivityManager(182): Activity pause timeout for HistoryRecord{40705358 com.clintonmedbery.natureapp/.Splash}
04-13 12:50:57.899: W/InputManagerService(182): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40706c38
04-13 12:50:57.929: I/Process(1397): Sending signal. PID: 1397 SIG: 9
04-13 12:50:57.959: I/ActivityManager(182): Process com.clintonmedbery.natureapp (pid 1397) has died.
04-13 12:50:59.360: D/dalvikvm(927): GC_EXPLICIT freed 6K, 51% free 2681K/5379K, external 0K/0K, paused 91ms
04-13 12:51:03.704: W/ActivityManager(182): Activity destroy timeout for HistoryRecord{40705358 com.clintonmedbery.natureapp/.Splash}
04-13 12:51:05.676: D/dalvikvm(942): GC_EXPLICIT freed 7K, 51% free 2676K/5379K, external 0K/0K, paused 68ms
04-13 12:51:17.088: I/EventLogService(431): Aggregate from 1397406077018 (log), 1397406077018 (data)
04-13 12:51:22.142: D/dalvikvm(951): GC_EXPLICIT freed 11K, 50% free 2727K/5379K, external 0K/0K, paused 41ms

0 个答案:

没有答案