Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error (androidx) #11

Open
tarekbazine opened this issue Aug 15, 2019 · 4 comments
Open

Build error (androidx) #11

tarekbazine opened this issue Aug 15, 2019 · 4 comments

Comments

@tarekbazine
Copy link

I got this error once I build (I think it is related to androidx migration )

Running Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\VideoPlayer.java:44: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\PersistentNotification.java:22: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\PersistentNotification.java:59: error: cannot find symbol
        @Nullable
         ^
  symbol:   class Nullable
  location: class PersistentNotification.MyMediaDescriptionAdapter
D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\PersistentNotification.java:65: error: cannot find symbol
        @Nullable
         ^
  symbol:   class Nullable
  location: class PersistentNotification.MyMediaDescriptionAdapter
D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\PersistentNotification.java:72: error: cannot find symbol
        @Nullable
         ^
  symbol:   class Nullable
  location: class PersistentNotification.MyMediaDescriptionAdapter
Note: D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\VideoPlayer.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\src\flutter\.pub-cache\hosted\pub.dartlang.org\media_player-0.0.7\android\src\main\java\com\example\mediaplayer\MediaPlayerPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':media_player: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 2m 15s
*******************************************************************************************
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

Please any help, thanks

@albertloubet
Copy link

I have this problem too.

@ronaldG19
Copy link

flutter 1.10.1 dev channel worked for me

@zhuruyi2013
Copy link

same error too

@zhuruyi2013
Copy link

comments the follow code can temp fix the problem :
android.useAndroidX=true
android.enableJetifier=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants