Flutter: RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496

When I try to build my app in release mode I run:
flutter build apk –release

And I get the following error:
RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496

The app works fine in debug mode.

I found a github issue where they said that updating flutter to the latest beta version solved it, but I ran:

flutter channel beta

And

flutter upgrade

And still get the error.

I opened an issue there but havent had an answer yet.

I expect to be able to generate the app bundle for uploading to google play.

This is the log:
RangeError (offset): Invalid value: Not in inclusive range 0..2374: 2496 #0 RangeError.checkValueInInterval (dart:core/errors.dart:313) #1 Source.getLocation (package:kernel/ast.dart:14992) #2 Component.getLocation (package:kernel/ast.dart:14787) #3 _getLocationInComponent (package:kernel/ast.dart:15181) #4 Procedure._getLocationInEnclosingFile (package:kernel/ast.dart:3329) #5 TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207) #6 TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207) #7 TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207) #8 TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207) #9 TreeNode._getLocationInEnclosingFile (package:kernel/ast.dart:207) #10 TreeNode.location (package:kernel/ast.dart:203) #11 localFunctionName (package:vm/transformations/type_flow/utils.dart:449) #12 SummaryCollector.createSummary (package:vm/transformations/type_flow/summary_collector.dart:630) #13 TypeFlowAnalysis.getSummary (package:vm/transformations/type_flow/analysis.dart:1782) #14 _DirectInvocation._processFunction (package:vm/transformations/type_flow/analysis.dart:398) #15 _DirectInvocation.process (package:vm/transformations/type_flow/analysis.dart:287) #16 _WorkList.processInvocation (package:vm/transformations/type_flow/analysis.dart:1663) #17 _WorkList.process (package:vm/transformations/type_flow/analysis.dart:1606) #18 TypeFlowAnalysis.process (package:vm/transformations/type_flow/analysis.dart:1811) #19 transformComponent (package:vm/transformations/type_flow/transformer.dart:121) #20 runGlobalTransformations (package:vm/kernel_front_end.dart:589) #21 compileToKernel (package:vm/kernel_front_end.dart:489) <asynchronous suspension> #22 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:639) <asynchronous suspension> #23 starter (package:frontend_server/starter.dart:101) <asynchronous suspension> #24 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13) <asynchronous suspension>

And this is the output of flutter doctor:
[√] Flutter (Channel beta, 3.22.0-0.3.pre, on Microsoft Windows [Versi¢n 10.0.19045.4291], locale es-CO)
• Flutter version 3.22.0-0.3.pre on channel beta at C:srcflutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 87b652410d (3 weeks ago), 2024-04-23 21:41:18 -0500
• Engine revision b4bfd45986
• Dart version 3.4.0 (build 3.4.0-282.3.beta)
• DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain – develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:UsersAlejandroAppDataLocalAndroidsdk
• Platform android-34-ext8, build-tools 34.0.0
• Java binary at: C:Program FilesAndroidAndroid Studiojbrbinjava
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
• All Android licenses accepted.

[√] Chrome – develop for the web
• Chrome at C:Program FilesGoogleChromeApplicationchrome.exe

[√] Visual Studio – develop Windows apps (Visual Studio Community 2022 17.9.4)
• Visual Studio at C:Program FilesMicrosoft Visual Studio2022Community
• Visual Studio Community 2022 version 17.9.34714.143
• Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.3)
• Android Studio at C:Program FilesAndroidAndroid Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.89.1)
• VS Code at C:UsersAlejandroAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.88.0

[√] Connected device (4 available)
• SM A226BR (mobile) • R9WW201HDLA • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versi¢n 10.0.19045.4291]
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.202
• Edge (web) • edge • web-javascript • Microsoft Edge 124.0.2478.105

[√] Network resources
• All expected network resources are available.

• No issues found!

New contributor

Alejandro Soto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật