2

The error show after I update my ADT, the project is created before the update.

In Login Activity,

public class LoginActivity extends Activity {

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

            // Do something here... if login success, Start another activity
        Intent i = new Intent(LoginActivity.this, MainActivity.class);
        LoginActivity.this.startActivity(i);
    }
.......
}

In MainActivity,

public class MainActivity extends FragmentActivity {
  protected void onCreate(Bundle savedInstanceState) {
    //......
  }
}

I try to remove all the code inside and back to a blank activity. The error is not happen because of the code inside the activity. I think is abut the extend FragmentActivity

Here is the error trace:

Unable to resolve superclass of Lhk/iactive/imoodle/activity/MainActivity; (15)
Link of class 'Lhk/iactive/imoodle/activity/MainActivity;' failed

I get this error after I update my ADT. I do some research on this topic. I try to import the android-support-v4.jar again and this do not fix the problem. I also read some blog like THIS ONE can not help me too :(

Jeff Lee
  • 783
  • 9
  • 17
  • 1
    try this if it helps http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127 – Raghunandan May 23 '13 at 06:46
  • I cant found my private library, But my android-support-v4.jar is store in Referenced Library. I check it in the setting and do not work too. Btw thank for you reply :d – Jeff Lee May 23 '13 at 06:51
  • I cant not solve the problem even I copy all the file in side the project to a new project that I have just created :( – Jeff Lee May 23 '13 at 07:01

2 Answers2

0

I have solve the problem by myself. I am going to share the solution hope there is other people who suffer from the same error can save some time :D

I try many method for example go to build Path Config -> Order and Exprot, All the library is already checked. And the NoClassPathFound error is still showing. I have no external Jar for the project and The error is from FragmentActivity from Android Support Library.

Then I delete the android-support-v4.jar complete and add it again by right clicked the project -> Android Tools -> Add support library...

After the new support library added. All the error fix. :D

Jeff Lee
  • 783
  • 9
  • 17
0

This worked for me:

For all projects (app and library):

  1. Right click the project, and choose Properties
  2. Go to Java Build Path-Order and Export.
  3. Tick 'Android Private Libraries'
vida
  • 4,459
  • 1
  • 22
  • 27