2013-08-07 2 views
-1

моего приложения имеет силы, близкую ошибку и я не знаю, как это исправитькак исправить принудительное закрытие ошибки в Android App

я пользователь этого кода до и это работает, но теперь есть сила близко ошибка

как исправить эту силу?

когда приложение хочет стат, сила близко происходит

мой XML:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" > 

<WebView 
    android:id="@+id/wv1" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 

<ProgressBar 
    android:id="@+id/pB1" 
    style="?android:attr/progressBarStyleHorizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:padding="2dip" /> 

моя активность:

package com.microweb.gapiha; 

import android.os.Bundle; 
import android.app.TabActivity; 
import android.content.Intent; 
import android.view.WindowManager; 

import android.widget.TabHost; 


@SuppressWarnings("deprecation") 
public class MainActivity extends TabActivity { 


public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 


     setContentView(R.layout.activity_main); 
     //keep screen on and alive 
     //getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); 
     TabHost mTabHost = getTabHost(); 

     mTabHost.addTab(mTabHost.newTabSpec("aval").setIndicator("social ").setContent(new Intent(this ,IntroActivity.class))); 
     mTabHost.addTab(mTabHost.newTabSpec("dovom").setIndicator("chat").setContent(new Intent(this ,ChatActivity.class)));   
     mTabHost.addTab(mTabHost.newTabSpec("sevom").setIndicator("chat 2 ").setContent(new Intent(this ,RandomActivity.class)));    
     mTabHost.setCurrentTab(0); 

} 

} 

LogCat:

08-07 08:23:03.887: E/StrictMode(646): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
08-07 08:23:03.887: E/StrictMode(646): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
08-07 08:23:03.887: E/StrictMode(646): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
08-07 08:23:03.887: E/StrictMode(646): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
08-07 08:23:03.887: E/StrictMode(646): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
08-07 08:23:03.887: E/StrictMode(646): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
08-07 08:23:03.887: E/StrictMode(646): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
08-07 08:23:03.947: E/StrictMode(646): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
08-07 08:23:03.947: E/StrictMode(646): at android.os.AsyncTask$2.call(AsyncTask.java:287) 
08-07 08:23:03.947: E/StrictMode(646): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
08-07 08:23:03.947: E/StrictMode(646): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
08-07 08:23:03.947: E/StrictMode(646): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
08-07 08:23:03.947: E/StrictMode(646): at java.lang.Thread.run(Thread.java:856) 
08-07 08:23:03.947: W/ActivityManager(288): Unbind failed: could not find connection for [email protected] 

я загрузил эти файлы и войти кот тоже: download my codes and log cat error form 4shared

+4

пост StackTrace в вашем посте, а не в почтовый индекс размещенного где-то. – njzk2

+0

Я не знаю, как это сделать –

+0

Windows -> Показать вид -> Другие -> Android -> LogCat –

ответ

0

Ваше activity_main.xml должно быть что-то вроде этого:

<?xml version="1.0" encoding="utf-8"?>  
<TabHost 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@android:id/tabhost"> 
     <LinearLayout 
      android:id="@+id/LinearLayout01" 
      android:orientation="vertical" 
      android:layout_height="fill_parent" 
      android:layout_width="fill_parent"> 
     <TabWidget 
      android:id="@android:id/tabs" 
      android:layout_height="wrap_content" 
      android:layout_width="fill_parent" /> 

     <FrameLayout 
      android:id="@android:id/tabcontent" 
      android:layout_height="fill_parent" 
      android:layout_width="fill_parent" /> 

     </LinearLayout>  
</TabHost> 
+0

Я использую код ур, но проблема все еще :( –

+0

Я только что проверил файл logcat, который вы загрузили на 4shared, – armansimonyan13

+0

Вы также должны изменить свою активность – armansimonyan13

Смежные вопросы