Skip to content

Plugins do not support AndroidX #23995

@shinayser

Description

@shinayser

I have a flutter project. Inside of its android folder I have a lot of android code, including background processing classes and some native UI. I updated this code to use the new androidX packages.

Now, some of the plugins stopped working. A example is the permission_handler plugin.

permissionhandler\PermissionHandlerPlugin.kt: (10, 31): Unresolved reference: ActivityCompat
permissionhandler\PermissionHandlerPlugin.kt: (11, 27): Unresolved reference: content
permissionhandler\PermissionHandlerPlugin.kt: (152, 37): Unresolved reference: ContextCompat
permissionhandler\PermissionHandlerPlugin.kt: (191, 20): Unresolved reference: ActivityCompat
permissionhandler\PermissionHandlerPlugin.kt: (235, 13): Unresolved reference: ActivityCompat`

I believe this is because the native Android part of my app is using the AndroidX packages, since those plugins are still using the old support library. In the current state, it is impossible to me to roll back to the support library.

Also, when I add the camera plugin I get the following error:

error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^

Is this a intended behavior? Can someone give me a light?

[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [versão 10.0.17134.376], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Community Edition (version 2018.2)
[√] Connected devices (1 available)

• No issues found!`

Metadata

Metadata

Assignees

Labels

c: crashStack traces logged to the consolep: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions