Skip to content

Deprecated API used in the ErrorActivity is crashing the app (when latest support library is used) #1494

@NickIliev

Description

@NickIliev

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: latest
  • Cross-platform modules: latest
  • Android Runtime: latest

Describe the bug

Deprecated API is crashing the app with:

platforms/android/app/src/debug/java/com/tns/ErrorReport.java:294: error: incompatible types: ErrorReport cannot be converted to BaseOnTabSelectedListener
tabLayout.setOnTabSelectedListener(this);

As a workaround, add an after-prepare hook to modify ErrorReport.java, line 294

from

tabLayout.setOnTabSelectedListener(this);

to

tabLayout.addOnTabSelectedListener(this);

To Reproduce

Use the latest version of the support library in your project.

Additional context

Reported via t.1433066

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions