不幸的是,在使用appcompat时停止了

时间:2013-08-08 08:28:18

标签: android android-studio build-error

现在我正在使用Android studio并尝试使用v7-appcompat。

我只是将我的依赖项更新为

dependencies {
compile 'com.android.support:support-v4:18.0.+'
compile "com.android.support:appcompat-v7:18.0.+"
}

并将我的Activity更改为范围ActionBarActivity

public class MainActivity extends ActionBarActivity {

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


@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}

}

运行时没有错误。 但在执行应用程序后,我面对'不幸已经停止'的消息。 我不知道出了什么问题。

这是log-cat。

07-23 22:08:00.001      784-784/com.android.exchange E/StrictMode: null
    android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d3a3a0 that 
    was originally bound here
    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
    at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
    at android.app.ContextImpl.bindService(ContextImpl.java:1418)
    at android.app.ContextImpl.bindService(ContextImpl.java:1407)
    at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
    at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
    at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
    at com.android.emailcommon.service.AccountServiceProxy.getDeviceId
    (AccountServiceProxy.java:116)
    at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
    at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
    at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
    at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
    at android.os.AsyncTask$2.call(AsyncTask.java:287)
    at java.util.concurrent.FutureTask.run(FutureTask.java:234)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    at java.lang.Thread.run(Thread.java:856)
07-23 22:08:00.001      303-868/system_process W/ActivityManager: Unbind failed: could not find 
connection for android.os.BinderProxy@41621520

0 个答案:

没有答案