17

I have gone through all the related threads about his error but i was not successful .

App was working fine and i found some updates on SDKs yesterday .

I Updated by Android SDK Tools to 22(Rev.) and updated other updates also to latest .

And when i run my app , it crashed with the Logs

05-17 05:27:37.039: E/AndroidRuntime(1406): FATAL EXCEPTION: main
05-17 05:27:37.039: E/AndroidRuntime(1406): java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.facebook.internal.SessionTracker.<init>(SessionTracker.java:76)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.facebook.widget.LoginButton.finishInit(LoginButton.java:475)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.facebook.widget.LoginButton.onFinishInflate(LoginButton.java:468)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:631)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:209)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.Activity.setContentView(Activity.java:1657)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.myproject.tabs.Tab_More.onCreate(Tab_More.java:92)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1491)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:676)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.widget.TabHost.setCurrentTab(TabHost.java:348)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:141)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:456)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.View.performClick(View.java:2485)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.view.View$PerformClick.run(View.java:9080)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.os.Handler.handleCallback(Handler.java:587)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.os.Looper.loop(Looper.java:130)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at android.app.ActivityThread.main(ActivityThread.java:3687)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at java.lang.reflect.Method.invokeNative(Native Method)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at java.lang.reflect.Method.invoke(Method.java:507)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
05-17 05:27:37.039: E/AndroidRuntime(1406):     at dalvik.system.NativeStart.main(Native Method)

And i have placed all my .Jar files in libs folder

i removed jars in the Project > Properties > Java Build Path .

But still i get this crash . Also i am getting crash in setContentView in onCreate method . Why do i get this crash in one particular activity , while other activities are running . Moreover i have blocked all my codes in that activity ( code is as below )

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

Any related answers are welcomed and thanks in Advance .

VIGNESH
  • 2,023
  • 8
  • 31
  • 46
  • make sure you have checked Android Private Library in the property of your project. and try to restart your eclipse. This error throws because of new updated version of adt and it could not found your library class. Path: project-> properties->Java build path-> Order and Export -> Android Private Libraries. – Maulik May 17 '13 at 06:18
  • yes , but all the libraries are added to the Android Private Library . I checked it already . – VIGNESH May 17 '13 at 06:22
  • have you install Android SDK Build Tools in Android SDK Manage? and also make sure check for updates, you have updated your software as well. and also make sure you have added android-support-v4 latest jar into your libs folder. – Maulik May 17 '13 at 06:24
  • yes i have checked and updated all the related ...... – VIGNESH May 17 '13 at 06:27
  • 1
    and also make sure you have added android-support-v4 latest jar into your libs folder. – Maulik May 17 '13 at 06:29

2 Answers2

23

Did you mark the checkboxes for required libraries in order and export tab

look at this Post

Deepak Joshi
  • 246
  • 2
  • 5
  • Yes, especially the Android Private Libraries, which is something that has changed in ADT 22, so says the "this post". – ThisIsNotMe Jul 24 '13 at 12:28
10

With SDK update to v22, the android dependencies and the android private libraries (v4, v7) are seperated into two different paths.

Make sure that all the libraries(of the main project) and the main project has "Android Private Libraries"(android cores) and the "Android Dependencies"(other libraries that particular project is dependent upon) is checked.

To do that, right click on the project, goto properties, select "Java Build Path" from the left panel, and in "Order and Export" tab, select the two.

thank you

arkentos
  • 989
  • 10
  • 10