Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28161

Android: Modules built with 9.1.0 and using deprecated getter/setter property methods will crash on 9.0.x apps

    Details

    • Story Points:
      5
    • Sprint:
      2020 Sprint 23, 2020 Sprint 24

      Description

      Steps to reproduce:

      1. Download the ti.map module.
      2. CD to folder: ./ti.map/android
      3. Do an appc ti sdk select 9.1.0 or higher Titanium version.
      4. Build via: appc run -p android --build-only
      5. Set up an app with Titanium 9.0.3.GA and built "ti.map" module.
      6. Build and run on Android.
      7. Notice the app crashes on startup with a linker error.

      Cause:
      If a module's Java method is assigned both a Kroll.method annotation and Kroll.getProperty/Kroll.setProperty annotation, then the code generation will inject a C++ logDeprecation() function whose signature has changed as of 9.1.0 (we've added a 3rd argument).
      https://github.com/appcelerator/titanium_mobile/pull/11049/files

      Work-Around:
      If you are using both Kroll.getProperty and Kroll.method annotations on the same Java method, then remove the Kroll.method since support for this is deprecated. You must also do the same for setters.

      @Kroll.getProperty
      @Kroll.method  // <- Remove this annotation
      public String getName() {
      	return "";
      }
       
      @Kroll.setProperty
      @Kroll.method  // <- Remove this annotation
      public void setName(String value) {
      	mName = value;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
              Tester:
              Lokesh Choudhary
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration