plugin error after AndroidX migration

2,138 views
Skip to first unread message

Nidhin Mahesh

unread,
Mar 2, 2019, 8:43:16 AM3/2/19
to Flutter Dev
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:9: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
                             ^
  symbol:   class ActivityCompat
  location: package android.support.v4.app
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:10: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
                                 ^
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:156: error: cannot find symbol
        ActivityCompat.requestPermissions(activity, perm, 0);
        ^
  symbol:   variable ActivityCompat
  location: class SimplePermissionsPlugin
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:163: error: cannot find symbol
        return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(activity, permission);
                                                    ^
  symbol:   variable ContextCompat
  location: class SimplePermissionsPlugin
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:171: error: cannot find symbol
            if (ActivityCompat.shouldShowRequestPermissionRationale(registrar.activity(), permission)) {
                ^
  symbol:   variable ActivityCompat
  location: class SimplePermissionsPlugin
C:\Users\hp\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:175: error: cannot find symbol
                if (ActivityCompat.checkSelfPermission(registrar.context(), permission) == PackageManager.PERMISSION_GRANTED) {
                    ^
  symbol:   variable ActivityCompat
  location: class SimplePermissionsPlugin
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':simple_permissions:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1

Steven McDowall

unread,
Mar 2, 2019, 9:19:48 AM3/2/19
to Nidhin Mahesh, Flutter Dev

hate to ask the obvious but have you checked the dart pub and made sure you are up to date on ALL your dependencies? 

flutter upgrade won't do the trick because a lot of dependecies were semvar high order ones -- meaning upgrade won't do them .. 

You need to manually check each dependency (and certainly the siimple_permissions one) and make sure to set to the latest version .. 

If that still doesn't work -- perhaps open an issue in the appropriate plugin area --

Oops -- that doesn't look good .. I just looked and simple_permissions hasn't been updated lately and its a PRIVATE repo and actually get's a 404 error..

Maybe look for a different plugin ??  Or contact the author (if the email even works) @    vladimi...@gmail.com



--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alok Soni

unread,
May 5, 2019, 4:24:37 PM5/5/19
to Flutter Dev
can you please tell me how you get solution of this as I am stuck on same error?
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Alok Soni

unread,
May 5, 2019, 4:26:05 PM5/5/19
to Flutter Dev
I am facing the same . issue while configuring the project, Please tell me how to fix this issue as i have got the same issue.

Steven McDowall

unread,
May 5, 2019, 4:41:49 PM5/5/19
to Alok Soni, Flutter Dev
Make sure to check the pub dart and that you are using the latest compatible AndoridX version .. you need to do this manually 


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.

Alok Soni

unread,
May 16, 2019, 4:38:58 AM5/16/19
to Flutter Dev
Hi Steven,


  but it is not working, can you help.


On Monday, 6 May 2019 02:11:49 UTC+5:30, Steven McDowall wrote:
Make sure to check the pub dart and that you are using the latest compatible AndoridX version .. you need to do this manually 
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Steven McDowall

unread,
May 16, 2019, 6:49:05 AM5/16/19
to Alok Soni, Flutter Dev

Well next steps are :

flutter upgrade
flutter clean
flutter run -v   this will tell us a lot more about what is going on ./ 



To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/e92ace70-856d-4e88-a70b-3787277ffd74%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages