I followed the instructions indicated in other threads on how to import external libraries, but after importing android-support-v7-appcompat.jar into the Referenced Libraries of my Android project (in ADT v.22.0.5) I get java.lang.ClassNotFoundException:
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
Can someone please shed some light?