Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7292

On Android,compile groovy class fails when script calls a static method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: Android, class generator
    • Labels:
      None
    • Environment:
      Android

      Description

      I use groovy on Android.
      When I call GroovyClassLoader.parseClass(scriptText),I received an exception:
      java.lang.NoClassDefFoundError: java/beans/Introspector
      I found that when the script call a static method from other class, or use a static field, the exception is threw.
      In many classes of groovy, they call method "java.beans.Introspector.decapitalize".But Android SDK does not contain class "java.beans.Introspector",so the exception is threw.

        Attachments

        1. TestUtil.java
          0.2 kB
          ChenQiang Jin
        2. TestGroovy.groovy
          0.1 kB
          ChenQiang Jin

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              jinchenfly ChenQiang Jin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: