google / blockly-android

Blockly for Android
Apache License 2.0
673 stars 209 forks source link

inflating BasicFieldLabelView error #613

Closed huangxiaojingCN closed 7 years ago

huangxiaojingCN commented 7 years ago

android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class com.google.blockly.android.ui.fieldview.BasicFieldLabelView

AnmAtAnm commented 7 years ago

@huangxiaojingCN Do you have any context for this error? Label views are very numerous in the Blockly standard blocks, and we have not seen any such issues.

huangxiaojingCN commented 7 years ago

@AnmAtAnm
There is my error log

20170607205529

AnmAtAnm commented 7 years ago

There isn't much detail in that log, but I'm guessing your application theme is not parented to BlocklyVerticalTheme.

From our getting started guide:

In the applications AppTheme, found in res/values/styles.xml, set the parent theme to BlocklyVerticalTheme.

<style name="AppTheme" parent="BlocklyVerticalTheme">
    <!-- Customize your theme here. -->
    ...
</style>

This parent style configures several defaults for the blocks and fields. You can find more details in the style's definition.