Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
139 views
in Technique[技术] by (71.8m points)

android - Error in xml layout, Can't convert to dimension: 15

Within my application I have an error in the graphical layout which shows up as:

error!
UnsupportedOperationException: Can't convert to dimension: 15
Exception details are logged in Window > Show View > Error LogThe following classes could not be found:
- TextView

When I run the application this works, but it shows the error in the graphical layout, does anyone know the cause of this.

It occurs when I put android:layout_marginTop="-3dip" , if I dont use - then this doesn't show.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I doubt you still need help with this problem; however, I ran into a similar message and thought I would share to hopefully help anyone else that might run into this error message.

I found that the error was only occurring in the "2.7in QVGA slider" device configuration. I also found that if I changed the negative value to a different number I no longer got the error message.

So, I ended up using -2 instead.

I am going to guess the error is caused by some of the scaling calculations in the graphical renderer. But it's not worth researching to find out at this point.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...