ShouldNotReachhere classFileParser ANDROID

喜你入骨 提交于 2019-11-28 10:44:35

Use "Run configurations" and make sure you select the Android application.

I resolved this by

  • Quit eclipse
  • Delete the bin and gen directories in your project
  • Start eclipse
  • Rebuild your project
Fredrik

Are you getting this error when running JUnit tests? If so, it seems like the fault I had but found a solution to. See my answer here

I ran across this error and thought it had something to do with my JRE since the documents specifically state 1.5 or 1.6, however it seems that there is one easy step that I (and it appears others) skimmed over. You must exclude the Android Bootstrap from the run configuration. Go to "Edit Run Configurations" and select the DatabaseConfigUtil run configuration and then go to the "Classpath" tab and remove the "Android Bootstrap".

A big thanks goes to this useful thread: https://groups.google.com/forum/#!topic/ormlite-android/Qaw4JD2KJ1Q

EDIT: I just realized that while my problem was the same, we had different goals. In your case you were trying to run an Android Project as a Java Application, however my issue was trying to run the ORMLite generator Java Application within an Android Project and it was automatically adding the android bootstrap to the classpath. So in the case mentioned in the question simply running it as an Android project instead of a Java Application should solve this issue.

I've never seen that error, but you can try the standard fixes: update or reinstall your JRE and the Android SDK. Might help...

Happens for me too but seems related to projects that depend on other library projects. This happens if I hit F11 to rerun while in the library project, but not when I do that from the app. I think it just gets confused when it tries to figure out how to run a library. So the workaround is simple enough but sure wasn't obvious to figure out.

Well...I think the problem is because you are using de android enviroment to run java applications. Probably you insert java code inside android structure and it can not "read" this.

you might had set launcher as Eclipse JUnit Launcher. if so you need to change to Android JUnit Test Launcher.

to do this

  1. right click on the code window
  2. run as
  3. run configurations
  4. at the bottom of the popup window you'll see a text which is saying "Using Eclipse JUnit Launcher" and a link at right of it texted as select other
  5. click on select other and change to Android JUnit Test Launcher
  6. run
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!