Closed iNima closed 4 years ago
Hi @iNima, This plugin hasn't been migrated to AndroidX at this point, alternatively I think we could set enableJetifier to false in our projects to let Gradle still use the old Android support libs to compile this plugin(or any other plugin that hasn't provide AndroidX support yet).
android.useAndroidX=true
android.enableJetifier=false
We will eventually migrate this plugin to AndroidX, and then update the major version of this plugin.
Hope this workaround works for you :)
Hi @nikli2009
Unfortunately, setting enableJetifier
to false didn't work for me.
By doing that our app receives this error without any more details (even by running flutter run -v
):
[ ] *******************************************************************************************
[ +1 ms] 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.
[ ] *******************************************************************************************
Gradle task assembleDebug failed with exit code 1
Based on this document the reason for setting enableJetifier
to true
is to be able to add plugins that have not yet migrated to AndroidX.
https://flutter.dev/docs/development/androidx-migration#what-if-my-app-is-migrated-to-androidx-but-not-all-of-the-plugins-i-use
So, now even I think the error messages I sent you in the first post might not be related to AndroidX at all. It seems that it's related to permission issues. Although I saw you have done some changes in the Android side related to the permission in 0.4.9, it still shows me the same error message as the first post above.
I hope there would be a solution for this otherwise I need to use another plugin and write everything from scratch related to the audio recording part of the app.
Please let me know if I need to test it in another way. Thanks.
Hi @iNima , my apology for all the troubles. To reproduce the issue, I was using 1.9.1+hotfix.6 to create a new flutter application with AndroidX support enabled (using Android Studio), then add this plugin, then run flutter build apk, the issue was reproduced. and then after that I set enableJetifier to false to make this finally works.
Could you provide your gradle version and would be better if paste build.gradle(the one under ./Android folder), with these information I can do more troubleshooting.
And it will be better if you could create a new flutter application just for testing and trying to integrate this plugin. If it doesn't works, please let me know.
(If all of these doesn't work, we will add AndroidX support later.)
Hi @iNima Just released AndroidX version(0.5.0), hope this build works for you.
In AndroidX project, use 0.5.x
In non-AndroidX project, use0.4.9
ps: As it's beta version(0.x.x), the middle number will be treated as Major Version, so for non-AndroidX project, it is still safe if marked the version ^0.4.9
in yaml. It won't automatically upgrade to 0.5.x.
Hi @nikli2009 Thanks a lot for this change. It works now in an AndroidX enabled project.
I found two more issues which I think would be better to create separate issue cards for them.
I think this issue card can be closed. Thanks Nima
Hi @nikli2009
The plugin works flawlessly on iOS but it does not compile on Android for my app. The
minSdkVersion
in my app is 23 and the app has been migrated to support AndroidXMy Flutter version is
1.9.1+hotfix.6
The error that I got while compiling the app on Android was this:
Could you please check this issue as well? Thanks Nima