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

Android build changes needed to use library in new project based on template #50

Open
Carl-CWX opened this issue Nov 27, 2021 · 1 comment

Comments

@Carl-CWX
Copy link

Carl-CWX commented Nov 27, 2021

Trying to use the library with a new flutter project, flutter doctor output :

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19042.1348], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.6)
[√] Android Studio (version 2020.3)
[√] Connected device (4 available)

Importing V1.1.4 into a new project required the following changes to the project generated by Flutter to support a phone running Android 12 (Pixel 6) and another running Android 10.

  • \android\build.gradle - "ext.kotlin_version = '1.3.50'" to "ext.kotlin_version = '1.4.32'"
  • \android\build.gradle - "classpath 'com.android.tools.build:gradle:4.1.0'" to "classpath 'com.android.tools.build:gradle:4.1.3'"
  • \android\app\build.gradle - "compileSdkVersion 30" to "compileSdkVersion 31"
  • \android\app\build.gradle - "targetSdkVersion 30" to "targetSdkVersion 31"
  • \android\app\build.gradle - "minSdkVersion 16" to "minSdkVersion 21" (Documented on pub.dev)
  • \android\app\src\main\AndroidManifest.xml - add android:exported="true" to the application tag (Android 12 requirement)
@Carl-CWX Carl-CWX changed the title Android build changes needed to use library in new project template Android build changes needed to use library in new project based on template Nov 27, 2021
@jhoogstraat
Copy link
Owner

Thanks for your suggested changes.

I am unable to put the changes into the code until next year, sadly..
If you like the changes to happen earlier, I am happy to accept PRs :)

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

2 participants