2017-04-06 7 views
1

私はCocoapodsアプリケーションを使用しています。現在Alamofireをインストールしようとすると、私は次のエラーを取得する:podfileでバージョンを指定する際の要件を満たすことができません。

Analyzing dependencies 
[!] Unable to satisfy the following requirements: 

- `Alamofire (~> 4.4)` required by `Podfile` 

None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.4)`. 

You have either: 
* out-of-date source repos which you can update with `pod repo update`. 
* mistyped the name or version. 
* not added the source repo that hosts the Podspec to your Podfile. 

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default 

これは私のpodfileです:私はバージョンを削除し、ちょうどpod 'Alamofire'を使用する場合は

project 'MyApp.xcodeproj' 

# Uncomment the next line to define a global platform for your project 
platform :ios, '10.0' 

target 'MyApp' do 
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    # Pods for MyApp 
pod 'Alamofire', '~> 4.4' 

end 

、それはバージョン4.0.1をインストールします。どうして?

答えて

-1

これは、新しいalmofireバージョンで必要なココアポッドバージョンがシステムにインストールされているバージョンよりも高いために発生している可能性があります。コマンドラインでpod --versionを使ってypu podのバージョンを確認してください。1.0 update pod specより小さい場合は、ここで手順を見つけることができます。 https://guides.cocoapods.org/using/getting-started.html 新しいポッドがインストールされます。また、あなたのポッドファイルにココアポッドよりもバージョンが指定されていないときは、それがサポートしている最新バージョンを選択してインストールします。なぜあなたのalmofireが4.0.1にアップデートされたのですか?

+0

はええ、私は以前のことを確認Cocoapodsアプリからインストールを実行する

。私はCocoapodsアプリと端末をチェックすると両方とも1.2です。 – GoldenJoe

0

問題はログの最後の行にあるとおりです。あなたはpod repo update

を実行する必要が

は私のための更新ボタンを持つメニュー仕様のレポでアプリ内のオプションがあるように見えます。しかし、これは動作していないようです。その後、MREはビルド - を実行することができ、コマンドライン>

関連する問題