flutter_keyboard_visibility icon indicating copy to clipboard operation
flutter_keyboard_visibility copied to clipboard

Impossible to build apk on Flutter 1.12.13

Open letsar opened this issue 5 years ago • 38 comments

Hi,

Thanks for your work on this plugin. We upgraded Flutter to the latest stable version (1.12.13+hotfix.5) and while our project can run, it cannot build an apk using

flutter build apk

We have this error:

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed                                    
     /Users/user/.gradle/caches/transforms-2/files-2.1/7faf2ad74a0b9932e38d86e684646e95/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
                                                                        
     /Users/user/.gradle/caches/transforms-2/files-2.1/7faf2ad74a0b9932e38d86e684646e95/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.

Our projet has been migrated to AndroidX, but the same error appears when I build with the example of this plugin.

Do you know how to resolve this?

letsar avatar Dec 12 '19 16:12 letsar

As a workaround, there is another plugin which is a fork of this plugin called :

flutter_keyboard_visibility: 0.7.0

I've gone over the code and the class names and usage is identical - so it should work out of the box.

You can get around the issue by :

  1. Using this plugin
  2. Change your gradle class to com.android.tools.build:gradle:3.5.0
  3. Change your targetSdkVersion to 28
  4. Ensure you reference latest gradle distribution URL : distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip
  5. Ensure your dependencies do not reference firebase, i.e change

dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test: runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'com.google.firebase:firebase-core:16.0.8' }

to

dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test: runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' }

Once all 1-5 is done, Do in order :

1. flutter clean 2. Open pubspec.yaml and just make a simple change and SAVE file 3. flutter pub cache repair

alexda12 avatar Dec 12 '19 19:12 alexda12

Thanks for the workaround @alexda12. It worked like a charm!

letsar avatar Dec 13 '19 08:12 letsar

As a workaround, there is another plugin which is a fork of this plugin called :

flutter_keyboard_visibility: 0.7.0

I've gone over the code and the class names and usage is identical - so it should work out of the box.

You can get around the issue by :

  1. Using this plugin
  2. Change your gradle class to com.android.tools.build:gradle:3.5.0
  3. Change your targetSdkVersion to 28
  4. Ensure you reference latest gradle distribution URL : distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip
  5. Ensure your dependencies do not reference firebase, i.e change

dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test: runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'com.google.firebase:firebase-core:16.0.8' }

to

dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test: runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' }

Once all 1-5 is done, Do in order :

1. flutter clean 2. Open pubspec.yaml and just make a simple change and SAVE file 3. flutter pub cache repair

After following above procedure, throw another error when I run flutter build apk

D:\Development\Node JS\XpertMemos\XpertMemo_flutter>flutter build apk You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64. If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size. To generate an app bundle, run: flutter build appbundle --target-platform android-arm,android-arm64,android-x64 Learn more on: https://developer.android.com/guide/app-bundle To split the APKs per ABI, run: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split Running Gradle task 'assembleRelease'...
Note: D:\Development\FlutterSDK\flutter.pub-cache\hosted\pub.dartlang.org\connectivity-0.4.3+6\android\src\main\java\io\flutter\plugins\connectivity\ConnectivityPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: D:\Development\FlutterSDK\flutter.pub-cache\hosted\pub.dartlang.org\permission_handler-3.3.0\android\src\main\java\com\baseflow\permissionhandler\PermissionHandlerPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: D:\Development\FlutterSDK\flutter.pub-cache\hosted\pub.dartlang.org\share-0.6.3+1\android\src\main\java\io\flutter\plugins\share\SharePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: D:\Development\FlutterSDK\flutter.pub-cache\hosted\pub.dartlang.org\url_launcher-5.1.3\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. D:\Development\Node JS\XpertMemos\XpertMemo_flutter\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:16: error: a type with the same simple name is already defined by the single-type-import of KeyboardVisibilityPlugin import com.github.adee42.keyboardvisibility.KeyboardVisibilityPlugin; ^ 1 error

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileReleaseJavaWithJavac'.

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 4m 29s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 270.4s (!) Gradle task assembleRelease failed with exit code 1

pubspec.yaml file

dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.2 sqflite: 1.1.7+2 path_provider: 0.5.0+1 http: 0.12.0+2 connectivity: 0.4.3+6 font_awesome_flutter: 8.5.0 flutter_sparkline: any flutter_staggered_grid_view: 0.3.0 intl: ^0.15.8 datetime_picker_formfield: ^0.4.3 qr_flutter: ^3.0.1 flutter_typeahead : 1.6.1
permission_handler: 3.3.0 encrypt: 1.0.1 loader_search_bar: any url_launcher : any geolocator: 5.1.5 file_picker: ^1.4.3+1 image_picker: ^0.6.1+4 progress_indicators: any mime: ^0.9.6+2 fluttertoast: ^3.1.0 pdf: ^1.3.11 printing: ^2.1.3 flutter_local_notifications: 0.7.1+3 image: 2.1.4 flutter_image_compress: ^0.6.3 carousel_slider: ^1.3.0 random_string: ^0.0.2 dio: 2.1.0 file_utils: ^0.1.3 translator: ^0.1.2 photo_view: 0.4.2 flutter_webrtc: 0.1.7 shared_preferences: any auto_size_text: ^2.1.0 firebase_messaging: ^5.1.2 workmanager: ^0.1.2 flutter_barcode_scanner: ^0.1.5+1 progress_dialog: ^1.1.0+1 archive: ^2.0.10 charts_flutter: ^0.8.1 flutter_vector_icons: ^0.2.1 flutter_google_places: ^0.2.3 share: ^0.6.3+1 flutter_keyboard_visibility: ^0.7.0

android\build.gradle file

dependencies { classpath 'com.android.tools.build:gradle:3.5.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.2.0' }

targetSdkVersion already 28 android\app\build.gradle file

dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test: runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' }

Basher7 avatar Dec 15 '19 12:12 Basher7

I have still facing this error

C:\Users\XPERT_005\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.6\android\src\main\java\io\flutter\plugins\sharedpreferences\SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext()); ^ 1 warning Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':keyboard_visibility:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
D:\Development\Node JS\XpertMemos\XpertMemo_flutter\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found. D:\Development\Node JS\XpertMemos\XpertMemo_flutter\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found. error: failed linking references.

  • 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 4m 26s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 267.8s (!) Gradle task assembleRelease failed with exit code 1

I also follow this steps. click here to see that post

Basher7 avatar Dec 17 '19 07:12 Basher7

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';

  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart

  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

adrianvintu avatar Dec 17 '19 17:12 adrianvintu

many many thanks brother, @adrianvintu . finaly solved this issue

Basher7 avatar Dec 18 '19 07:12 Basher7

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

Yes It's Work

majdkz97 avatar Dec 22 '19 15:12 majdkz97

@adrianvintu you safe mine ton of time

bravekingzhang avatar Dec 26 '19 09:12 bravekingzhang

@adrianvintu Thank you!

marco2250 avatar Jan 24 '20 21:01 marco2250

I run into the same problem but found a better solution without hacking https://stackoverflow.com/a/25736483/1016472

ghost avatar Jan 28 '20 10:01 ghost

Solved:

  • Delete pubspec.lock
  • Run command package get in pubspec.yalm

LeDuyTho avatar Feb 05 '20 02:02 LeDuyTho

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

I have same error cn you help me solve it ?

incepio-flutter avatar Feb 10 '20 11:02 incepio-flutter

3. keyboard_visibility-0.5.6

my Path is not same as yours, mine is in D:\flutter\.pub-cache\hosted\pub.flutter-io.cn\keyboard_visibility-0.5.6\android

HarrisonQi avatar Feb 18 '20 11:02 HarrisonQi

@adrianvintu yes, it works.

cddsgtc avatar Mar 19 '20 06:03 cddsgtc

@alexda12 worked thanks

lavahasif avatar Apr 01 '20 08:04 lavahasif

I find two ways to resolve this problem:

  1. Add a flavor
  2. run ./gradlw :app:assembleRelease instead of ./gradlew assembleRelease in android folder.

But i don't know why it does work. 😢

chenenyu avatar Apr 14 '20 12:04 chenenyu

Como eu o consertei, no seu texto. Meu erro foi

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. As keyboard_visibilityvaras se destacam três vezes, então eu fui nos meus arquivos .dart e encontrei import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. Cliquei keyboard_visibility.dartpara que ele me leve à fonte - aparece ao norte no Código do Visual Studio - o caminho era:c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. Depois fui c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle compileSdkVersion 27 para compileSdkVersion 28 e pronto, funciona!

It = executando isso flutter build apk --release

Sim, é trabalho

it really works. in my case C:\Users\loure\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle

from: android {      compileSdkVersion 27 ...

for: android {      compileSdkVersion 28 ...

thank you very much

lourencosjr avatar Apr 14 '20 23:04 lourencosjr

Any updates on this? Is there any better way to do solve this than this workaround?

tzvc avatar Apr 19 '20 17:04 tzvc

I have still facing this error

C:\Users\XPERT_005\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.6\android\src\main\java\io\flutter\plugins\sharedpreferences\SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext()); ^ 1 warning Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':keyboard_visibility:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed D:\Development\Node JS\XpertMemos\XpertMemo_flutter\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found. D:\Development\Node JS\XpertMemos\XpertMemo_flutter\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found. error: failed linking references.

  • 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 4m 26s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 267.8s (!) Gradle task assembleRelease failed with exit code 1

I also follow this steps. click here to see that post

How did you resolve this error? I have the same error

zjy886 avatar Apr 21 '20 16:04 zjy886

@zjy886 Look in the posts below, I migrated to flutter_keyboard_visibility and changed just two lines of code. Works fine now. Look at what @alexda12 wrote

filippo-orru avatar Apr 22 '20 10:04 filippo-orru

Como eu o consertei, no seu texto.

Meu erro foi

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. As keyboard_visibilityvaras se destacam três vezes, então eu fui nos meus arquivos .dart e encontrei import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. Cliquei keyboard_visibility.dartpara que ele me leve à fonte - aparece ao norte no Código do Visual Studio - o caminho era:c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. Fui então c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle alterado compileSdkVersion 27 para compileSdkVersion 28 e pronto, ele funciona!

It = executando isso flutter build apk --release

it's worked to me when proximity_plugin on flutter doesn't worked. I changed the sdk version on build.gradle of the plugin above. Thank You!!!

Gabriel-Aquino avatar May 11 '20 21:05 Gabriel-Aquino

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

It's works for me. Thanks

salusou avatar May 16 '20 03:05 salusou

Sooo... Will the creators finally bump up compileSdkVersion of this app, so that we don't have to remember that?

michcio53 avatar May 28 '20 11:05 michcio53

I have property updated the package and bumped compile version here: https://github.com/MisterJimson/flutter_keyboard_visibility

MisterJimson avatar Jun 02 '20 19:06 MisterJimson

I run into the same problem but found a better solution without hacking https://stackoverflow.com/a/25736483/1016472

After fighting for few hours and digging a ton of internet I'm really looking for a way to broadcast this to the world. This is the most correct solution so far, without doing magic of digging into each and every of particular flutter plugins with old versions in build.gradle.

Thanks, man!

soxjke avatar Jul 28 '20 11:07 soxjke

After a lot of searching I finally reached the pub.dartlang.org folder only to find there is no keyboard-visibility package there. Any clue?

Dhar15 avatar Aug 12 '20 07:08 Dhar15

@Dhar15 I suggest using my updated fork: https://pub.dev/packages/flutter_keyboard_visibility

MisterJimson avatar Aug 12 '20 11:08 MisterJimson

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

thank you mass broo.

mrtampan avatar Sep 08 '20 05:09 mrtampan

Hi @letsar have you solved your issue with the latest version of flutter? Thanks.

Abhishek01039 avatar Oct 11 '20 17:10 Abhishek01039

How I fixed it, from your text.

My error was

* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:236: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\a_progra\hg\flutter\the_wind_method\build\keyboard_visibility\intermediates\res\merged\release\values\values.xml:237: AAPT: error: resource android:attr/ttcIndex not found.
  1. The keyboard_visibility sticks out 3 times, so I went in my .dart files and found import 'package:keyboard_visibility/keyboard_visibility.dart';
  2. I clicked on keyboard_visibility.dart so it takes me to the source - it appears north in Visual Studio Code - path was: c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\lib\keyboard_visibility.dart
  3. I then went to c:\flutter\.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android\build.gradle changed compileSdkVersion 27 to compileSdkVersion 28 and voila, it works!

It = running this flutter build apk --release

It Works !! Thanks a lot for very detail steps.

antzkeren avatar Oct 15 '20 01:10 antzkeren