2016-04-23 14 views
2

Xamarin.Formsプロジェクトがあり、iOSアプリケーションアイコンを追加したいとします。だから私は、資産カタログを作成しましたが、私はそれを開いたとき、私は任意のアイコンを追加することはできません。Visual Studio 2015でiOSアプリケーションアイコンを追加できません。

Visual Studio

私はUpdate 2のVS 2015を使用して、最新Xamarinバージョンです。 私はそれがうまくいかなければならないかのビデオを見つけました:https://www.youtube.com/watch?v=KZbrLwJwGeE 私はどのアイコンを追加できないのか分かりません。

鉱山Contents.jsonは、次のようになります。あなたはそれが壊れている可能性がありますAppIconsためContents.jsonをチェックすることができ

{ 
"images": [], 
    "properties": {}, 
"info": { 
    "version": 1, 
    "author": "xamarin" 
} 
} 

答えて

0

ていますか?あなたがそうのようなファイル名を設定するには、テキストエディタを使用して手動でXMLを編集しようとすることができ

{ 
    "images": [ 
    { 
     "idiom": "iphone", 
     "size": "29x29", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "29x29", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "29x29", 
     "scale": "3x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "40x40", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "40x40", 
     "scale": "3x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "57x57", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "57x57", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "60x60", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "iphone", 
     "size": "60x60", 
     "scale": "3x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "29x29", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "29x29", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "40x40", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "40x40", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "50x50", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "50x50", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "72x72", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "72x72", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "76x76", 
     "scale": "1x" 
    }, 
    { 
     "idiom": "ipad", 
     "size": "76x76", 
     "scale": "2x" 
    }, 
    { 
     "idiom": "car", 
     "size": "120x120", 
     "scale": "1x" 
    }, 
    { 
     "size": "24x24", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "notificationCenter", 
     "subtype": "38mm" 
    }, 
    { 
     "size": "27.5x27.5", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "notificationCenter", 
     "subtype": "42mm" 
    }, 
    { 
     "size": "29x29", 
     "idiom": "watch", 
     "role": "companionSettings", 
     "scale": "2x" 
    }, 
    { 
     "size": "29x29", 
     "idiom": "watch", 
     "role": "companionSettings", 
     "scale": "3x" 
    }, 
    { 
     "size": "40x40", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "appLauncher", 
     "subtype": "38mm" 
    }, 
    { 
     "size": "44x44", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "longLook", 
     "subtype": "42mm" 
    }, 
    { 
     "size": "86x86", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "quickLook", 
     "subtype": "38mm" 
    }, 
    { 
     "size": "98x98", 
     "idiom": "watch", 
     "scale": "2x", 
     "role": "quickLook", 
     "subtype": "42mm" 
    } 
    ], 
    "info": { 
    "version": 1, 
    "author": "xcode" 
    } 
} 

を::

{ 
    "filename": "icon-29.png", 
    "size": "29x29", 
    "scale": "1x", 
    "idiom": "iphone" 
}, 

icon-29.pngます、それは次のようになりますImages.xcassets>AppIcons.appiconset>Contents.jsonになりますその後、フォルダAppIcons.appiconsetに追加する必要がありますが、あなたのコメントから、私はこれがバグであり、ここにファイルされると思います。https://bugzilla.xamarin.com/

+0

Mine Content.jsonはほとんど空です。質問の更新をご覧ください。 私はあなたのバージョンに置き換えましたが、それは役に立たなかったです。 VSの再起動後、変更は元に戻りました。 – pfedotovsky

+0

うまくいけないようですが、Xam.forumshttpsのこのスレッドを見るとバグかもしれませんね。//forums.xamarin.com/discussion/11503/images-xcassets-in-visual-studio/p2そのa VSが資産カタログをサポートするための新機能。私はバグを報告します。 Contents.jsonのバージョンをイメージセットとともに追加することもできますが、もう一度それを消去すると思います。 –

+0

同じ問題ですが、私のアプリはVSからシミュレータに正しくデプロイされません。すべてがうまくコンパイルされますが、リソースが見つからないため、アプリケーションがすぐにクラッシュします。 PDFアセットは展開されていないようです。 Xamarin Studioからうまく動作します。 – chrilith

1

これはVS用のXamarinプラグインの既知の問題です。

VSでは、すべてのアセットカタログを削除します。 Xamarin Studio Macでソリューションを開きます。アセットカタログを追加します。 Resources/Images.xcassets/AppIcons.appiconset /の.jsonファイルをダブルクリックすると、作業エディタが開きます。そこにあなたのアイコンを入れてください。ソリューションを保存します。

これで、VSでソリューションを再度開くことができます。これが修正されるまで(何ヶ月もかかることがあります)、VSでアセットカタログを編集しないでください。

関連する問題