简体   繁体   中英

Can not build release Flutter APK

I've been running my project on my emulators for some time now, i decided to build an APK to run on a physical device but i keep getting the error below

FAILURE: Build failed with an exception.

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

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed C:\\src\\flutter.pub-cache\\hosted\\pub.flutter-io.cn\\twilio_voice-0.0.9\\android\\src\\main\\res\\layout\\activity_answer.xml:17: AAPT: error: resource drawable/splash_icon (aka com.twilio.twilio_voice:drawable/splash_icon) not found.

 C:\src\flutter\.pub-cache\hosted\pub.flutter-io.cn\twilio_voice-0.0.9\android\src\main\res\layout\activity_background_call.xml:18: AAPT: error: resource drawable/splash_icon (aka com.twilio.twilio_voice:drawable/splash_icon) not found.

Apparently its complaining about a missing splash_icon from a pugin I'm using, this splash_icon is present in the right folder and should not be a problem, the strange thing is that it works fine on emulators. I can't seem to detect the issue

I solved this error by writing a custom package for this purpose. The package is available on my GitHub if you want to see the changes.

In your pubspec.yaml import this package instead of the package you previously imported from from pub.dev


twilio_voice:
    git:
      url: https://github.com/UsamaSarwar/twilio_voice.git
      ref: main

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM