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

Build Fails #37

Closed
irperera opened this issue Oct 2, 2019 · 16 comments
Closed

Build Fails #37

irperera opened this issue Oct 2, 2019 · 16 comments
Labels
bug Something isn't working iOS The issue persist in iOS only resolved The issue has been addressed in latest release.
Milestone

Comments

@irperera
Copy link

irperera commented Oct 2, 2019

when trying to build the example project. I get this.

Xcode's output:

error: Unexpected duplicate tasks:
1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/irperera/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_on.png' to '/Users/irperera/Developer/flutterProjects/flutter_barcodec/build/ios/Debug-iphoneos/flutter_barcode_scanner/flutter_barcode_scanner.framework/ic_flash_on.png'
2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/irperera/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_on.png' to '/Users/irperera/Developer/flutterProjects/flutter_barcodec/build/ios/Debug-iphoneos/flutter_barcode_scanner/flutter_barcode_scanner.framework/ic_flash_on.png'
error: Unexpected duplicate tasks:
1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/irperera/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png' to '/Users/irperera/Developer/flutterProjects/flutter_barcodec/build/ios/Debug-iphoneos/flutter_barcode_scanner/flutter_barcode_scanner.framework/ic_flash_off.png'
2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/irperera/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png' to '/Users/irperera/Developer/flutterProjects/flutter_barcodec/build/ios/Debug-iphoneos/flutter_barcode_scanner/flutter_barcode_scanner.framework/ic_flash_off.png'
note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the precompiled application for the device.

Error launching application on iPhone.

@irperera irperera changed the title Build Failes Build Fails Oct 2, 2019
@wk-j
Copy link

wk-j commented Oct 3, 2019

Change deployment target to 11.0 fix the problem

@NTMS2017
Copy link

NTMS2017 commented Oct 5, 2019

Same here, I just update my deployment target to 11 and I keep getting same error. Before I did I use flutter clean command and invalidate cash restart. I also delete the previous file under '/Users/niyazitoros/Library/Developer/Xcode/DerivedData/' and keep getting same error. And I am using Xcode Version 11.0 (11A420a). I canT publish my app now. Any idea?

flutter doctor -v

[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G95, locale tr-TR)
    • Flutter version 1.9.1+hotfix.4 at /Users/niyazitoros/flutter
    • Framework revision cc949a8e8b (7 days ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/niyazitoros/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.7.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Community Edition (version 2019.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 40.0.4
    • Dart plugin version 192.6817.14

The error:

Unexpected duplicate tasks:
1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png' to '/Users/niyazitoros/Library/Developer/Xcode/DerivedData/Runner-doaafysyyznugmceekmtbamutrsq/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/flutter_barcode_scanner.framework/ic_flash_off.png'

2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bundle/ic_flash_off.png' to '/Users/niyazitoros/Library/Developer/Xcode/DerivedData/Runner-doaafysyyznugmceekmtbamutrsq/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/flutter_barcode_scanner.framework/ic_flash_off.png'

@NTMS2017
Copy link

NTMS2017 commented Oct 6, 2019

Ok. I found the solution but I am not sure if this solution is immediate or long term.

Solution: From left navigator in Xcode I found Pods/Development Pods/flutter_barcode_scanner.podspec and change s.ios.deploymnet_target = '10.0' to '11.0'

I run Xcode archive, validate and disturubition and finally I upload my new version to App Store.

Ekran Resmi 2019-10-06 15 41 58

@NTMS2017
Copy link

NTMS2017 commented Oct 22, 2019

After upgrading flutter stable 1.9.1 hot fix 5 I got similar error. I change target to 10.0 and still got similar error.

niyazitoros@Niyazi-MBP my_cep % flutter build ios
Automatically signing iOS for device deployment using specified development team in Xcode project: XZ8MCQL76F
Running pod install...                                              1.8s
Running Xcode build...                                                  
                                                   
Xcode build done.                                            2.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    error: Unexpected duplicate tasks:
    1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bund
    le/ic_flash_off.png' to
    '/Users/niyazitoros/IdeaProjects/my_cep/my_cep/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_off.png'
    2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bund
    le/ic_flash_off.png' to
    '/Users/niyazitoros/IdeaProjects/my_cep/my_cep/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_off.png'
    error: Unexpected duplicate tasks:
    1) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bund
    le/ic_flash_on.png' to
    '/Users/niyazitoros/IdeaProjects/my_cep/my_cep/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_on.png'
    2) Target 'flutter_barcode_scanner' (project 'Pods') has copy command from
    '/Users/niyazitoros/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_barcode_scanner-0.1.7/ios/Classes/resource.bund
    le/ic_flash_on.png' to
    '/Users/niyazitoros/IdeaProjects/my_cep/my_cep/build/ios/Release-iphoneos/flutter_barcode_scanner/flutter_ba
    rcode_scanner.framework/ic_flash_on.png'
    note: Using new build systemnote: Planning buildnote: Constructing build description

Encountered error while building for device.

@nguyenhuutinh
Copy link

nguyenhuutinh commented Nov 1, 2019

same issue. any idea?

@Jasonhadzi
Copy link

same issue here

@AmolGangadhare
Copy link
Owner

Try pod install the plugin might not have downloaded properly. Then open project using .xcworkspace

@ashish-agarwal
Copy link

Facing the same problem. Anyone got the fix? tried everything from above. Nothing works

@git-xbits
Copy link

Try pod install the plugin might not have downloaded properly. Then open project using .xcworkspace

I tryed pod install, pod update, any result is change target to 11.0;

I believe you'll need to change documentation.


[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale pt-BR)
    • Flutter version 1.9.1+hotfix.6 at /Users/phelipepalte/SDK/flutter
    • Framework revision 68587a0916 (10 weeks ago), 2019-09-13 19:46:58 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/phelipepalte/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2.1, Build version 11B53
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.0.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] VS Code (version 1.40.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter


@yalaxtech
Copy link

still facing this error

@AmolGangadhare AmolGangadhare added bug Something isn't working iOS The issue persist in iOS only labels Nov 27, 2019
@AmolGangadhare AmolGangadhare added this to In development in Barcode Scanner Dashboard Nov 27, 2019
@AmolGangadhare AmolGangadhare moved this from In development to Done in Barcode Scanner Dashboard Nov 27, 2019
@yalaxtech
Copy link

yalaxtech commented Nov 27, 2019

Open code ->
Goto pods ->
Open development pods ->
Open flutter_barcode_scanner ->
Open Pod ->

Now in flutter_barcode_scannner.podspec

s.source_files = 'Classes/**/*'

with

s.source_files = 'Classes/**/*.{swift,h,m}'

@sunxcode
Copy link

sunxcode commented Dec 4, 2019

Try this:
File -> workspace settings,Choose Legacy Build System
Archive success.

@AmolGangadhare AmolGangadhare added the resolved The issue has been addressed in latest release. label Dec 24, 2019
@AmolGangadhare
Copy link
Owner

This issue has been resolved. It will be available in the new release.

@NTMS2017
Copy link

Thanks @AmolGangadhare, when will be next release?

@AmolGangadhare AmolGangadhare added this to the V 1.0.0 milestone Jan 3, 2020
@alereisan
Copy link

I can confirm only way the app builds currently is with legacy build system in xcode.

@AmolGangadhare
Copy link
Owner

V1.0.0 has been released

The issue is expected to be resolved.

Closing this issue, feel free to reopen if the issue persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iOS The issue persist in iOS only resolved The issue has been addressed in latest release.
Projects
Development

No branches or pull requests