could not find class referenced from method android java.lang.NoClassDefFoundError

前端 未结 3 994
执笔经年
执笔经年 2021-02-10 16:06

I\'m calling for a separate class I have written in same package as my MainActivity class is saved. but when I run the application it gives me java.lang.NoCla

相关标签:
3条回答
  • 2021-02-10 16:39

    right click on project -> Properties-> Java Build Path -> Order and Export Tab and select your private libraries.

    0 讨论(0)
  • 2021-02-10 16:44

    Right Click on your

     project -> Build Path -> Configure Build Path -> Order and Export Tab.
    

    Make sure that "Android Private Libraries" is checked for Export.

    If you've added any libraries from the libs/ folder, remove them as they are automatically added in the "Android Private Libraries" section.

    0 讨论(0)
  • 2021-02-10 16:58

    In MainActivity class: import com.example.hcpandroid.SSLAuthenticate; Then After that if you have imported external library jar file import them to the LIB folder.

    Right Click Your Project -> Properties -> Java Build Path -> Order and Export -> Select All -> Press OK -> go clean your project.

    hope this solve your problem.

    0 讨论(0)
提交回复
热议问题