appcompat - Unfortunately has stopped - android -
i compiled when run, faced message when excute application. 'unfortunately has stopped'
now i'm trying use v7-appcompat update couple of days ago. source code.
main activity
package com.exasmple.oh; import android.os.bundle; import android.support.v7.app.actionbaractivity; import android.view.menu; import android.view.menuitem; 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 menu; adds items action bar if present. getmenuinflater().inflate(r.menu.main, menu); menuitem searchitem = menu.finditem(r.id.menu_search); return super.oncreateoptionsmenu(menu); } }
menu
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yourapp="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/menu_search" android:title="menu" yourapp:actionviewclass="android.support.v7.widget.searchview" yourapp:showasaction="always" /> <item android:id="@+id/share" android:title="share" yourapp:actionviewclass="android.support.v7.widget.shareactionprovider" yourapp:showasaction="always" /> </menu>
and updates build.gradle this.
compile 'com.android.support:appcompat-v7:18.0.+'
and import library \\
this isn't error before run, after run.
logcat
07-23 20:40:11.801 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 bound here @ android.app.loadedapk$servicedispatcher.<init>(loadedapk.java:969) @ android.app.loadedapk.getservicedispatcher(loadedapk.java:863) @ android.app.contextimpl.bindservice(contextimpl.java:1418) @ android.app.contextimpl.bindservice(contextimpl.java:1407) @ android.content.contextwrapper.bindservice(contextwrapper.java:473) @ com.android.emailcommon.service.serviceproxy.settask(serviceproxy.java:157) @ com.android.emailcommon.service.serviceproxy.settask(serviceproxy.java:145) @ com.android.emailcommon.service.serviceproxy.test(serviceproxy.java:191) @ com.android.exchange.exchangeservice$7.run(exchangeservice.java:1850) @ com.android.emailcommon.utility.utility$2.doinbackground(utility.java:551) @ com.android.emailcommon.utility.utility$2.doinbackground(utility.java:549) @ android.os.asynctask$2.call(asynctask.java:287) @ java.util.concurrent.futuretask.run(futuretask.java:234) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1080) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:573) @ java.lang.thread.run(thread.java:856) 07-23 20:40:11.811 303-546/system_process w/activitymanager: unbind failed: not find connection android.os.binderproxy@40e91230
Comments
Post a Comment