Skip to content


Subversion checkout URL

You can clone with
Download ZIP


View constant conversion errors aren't very clear #252

baroquebobcat opened this Issue · 4 comments

2 participants


When you attempt to use a symbol for a view value, and there isn't a constant it maps to, you get an error with a message like cannot convert instance of class org.jruby.RubySymbol to int from the ruboto/widgets.rb file. It'd be nice if the error was more specific. eg :match_parent doesn't have a corresponding View constant, maybe directing people to the docs for ViewGroup.LayoutParams and Gravity as those are where the constants are converted from.

I ran into this because the default generated activity is not android-7 compatible as it uses :match_parent which was introduced in android-8.

@donv donv was assigned

Hi @baroquebobcat !

Sorry for the late response. I'll take a look at improving the error message to something more helpful.

Not so good that our activity template fails on android-7, but is android-7 an interesting target anymore?


Revisiting this now.

@donv donv referenced this issue from a commit
@donv donv * Issue #252 View constant conversion errors aren't very clear
* Added a hopefully better error message when a constant is not found.

Hi @baroquebobcat !

Does this look better? The error message has been changes like you requested.

@donv donv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.