问题
I had many objects using px. I changed everything in my app to dp and textsizes to sp. Now my app won't open. When I use the debugger and go step by step it does open and then displays this. I did not change any code from before when it was working, just the px. By the way, I am using tabHost and their should be 5 tabs on the bottom. It splits it into about 30. It is just very strange stuff going on. Do you know what is wrong and how to fix it?
Thank you.
This image is the error message:

This image is using the debugger.

回答1:
Read about DDMS and logcat to obtain a stacktrace and to see what the problem is: http://developer.android.com/guide/developing/debugging/debugging-projects.html
This is what you are looking for:

回答2:
Revert all sp and dp back to px, and make sure it works again. then start doing small incremental changes to isolate which UI element is causing the problem. When you find which one did it, look through your code to see if you're making any assumptions and calculations based on the size of that UI element.
来源:https://stackoverflow.com/questions/6554257/in-android-app-i-changed-all-px-to-dp-and-sp-now-it-is-not-opening-what-is-wro