Could not build the precompiled application for the device.

flutter

목록 보기
4/5

밑에 꺼 다 안됐음; 이것만 보기

  • Could not build the precompiled application for the device.
    • rust message 만들었는지 먼저 확인하기
    1. rinf message
 find ./native/hub/src/messages -exec perl -pi -e 's/#\[derive\(Clone, PartialEq, ::prost::Message\)\]/#\[derive\(Serialize, Deserialize, Clone, PartialEq, ::prost::Message\)\]
#[serde(rename_all = "camelCase")]/g' {} \;
find ./native/hub/src/messages -exec perl -pi -e 's/#\[derive\(Clone, PartialEq, ::prost::Oneof\)\]/use serde::{Deserialize, Serialize};
#\[derive\(Serialize, Deserialize, Clone, PartialEq, ::prost::Oneof\)\]
#[serde(rename_all = "camelCase")]/g' {} \;
find ./native/hub/src/messages -exec perl -pi -e 's/\/\/ \@generated/use serde::{Serialize, Deserialize}\;
\/\/ \@generated/g' {} \;
  1. 네트워크 연결을 확인해 주세요 -> 설정에서 인터넷 공유 켜져있는지 확인하기.

Could not build the precompiled application for the device.

  1. sudo gem update cocoapods : 이미 업데이트 됐다고 뜸
  2. brew upgrade cocoapods : 1.12.1 -> 1.15.2 로 업데이트

(flutter pub upgrade, clean 으로 해결 안됐었음)

이래도 안돼서 다른 방법 서치.

여기서 flutter run 했는데

[!] Automatically assigning platform iOSwith version15.0on targetRunnerbecause no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

위와 같은 안내메시지 뜸


다시 서치. https://blog.dglee.co.kr/34
ios/Podfile 경로로 가서 위의 경고 메시지 돼있는 15.0버전으로 platform :ios, '15.0' 로 설정함.
그리고 pod install 했는데, 아래와 같이 에러메시지 뜸.

[!] Unable to find a target named RunnerTests in project Runner.xcodeproj, did find Runner.

-> 위의 블로그처럼 runnerTest 로 검색해서 프로젝트 내에 있는

target 'RunnerTests' do
  inherit! :search_paths
  end

위의 부분 주석처리하고 pod install 하니까 돌아감.

그래도 안됨....
pathnotfoundexception: cannot open file, path = 'pubspec.yaml' (os error: no such file or directory, errno = 2)
위의 에러가 떠서 또 서치함. https://github.com/flutter/flutter/issues/93868

sudo arch -x86_64 gem install ffi
arch -x86_64 pod install

위의 arch -x86_64 pod install 를 하는데 또 다른 에러가 떴다.

[!] Invalid Podfile file: /Users/-----/Desktop/앱이름/ios/Flutter/Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first.
..................
from /Users/------/Desktop/-------/ios/Podfile:16
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

  1. sudo arch -x86_64 gem install ffi
  2. pubspec.yaml에서 pub get 버튼 누르기
  3. 다시 arch -x86_64 pod install 하니까 명령어 실행됨.
    ---> 문제가 해결안됨..;

출처

profile
백엔드를 공부하고 있습니다.

0개의 댓글