2016-05-20 6 views
3

共有Xamarin.FormsプロジェクトでOxyPlot.Xamarin.Formsパッケージを使用しようとしています。OxyPlot.Xamarin.FormsパッケージがResource.Designer.csを破損していますか?

http://docs.oxyplot.org/en/latest/getting-started/hello-xamarin-forms.html

それから私は、AndroidプロジェクトにOxyPlotレンダラを初期化:でdescripedように私は(アンドロイド)プロジェクトポータブルおよびプラットフォーム固有の両方にNuGetパッケージマネージャでOxyPlotパッケージを追加しました。今、私は、App Resource.Designer.csファイルが生成された起動しようとするが、私はそうのようなエラーの数百を取得する場合:私はXamarin.Formsのv2.2.0.31とのすべてのOxyPlotパッケージを使用

Error CS0117 'Resource.Attribute' does not contain a definition for 'mediaRouteSettingsDrawable' OxyPlotShared.Droid \OxyPlotShared\OxyPlotShared.Droid\Resources\Resource.Designer.cs 

をバージョン1.0.0-unstable1983。

何か不足していますか?

答えて

1

ポータブル共有という2つの異なるプロジェクトテンプレートがあります。あなたのポストでは両方のことを言及していますので、どちらを使用しているのかを明確にしてください。あなたが従う具体例は、ポータブルプロジェクトテンプレートです。 OxyPlot Nugetパッケージを追加した後、私は手動でとOxyPlot.Xamarin.Forms参照ポータブル 1のOxyPlotを追加する必要がありました。その後、うまくいきました。私はXamarin.Forms 2.0.0.6482とOxyPlot 1.0.0-unstable1983を使用しています。

私は、コードを使用してPlotViewを追加しました:

App.cs:

public App() 
    { 
     PlotModel plotModel = new PlotModel { PlotAreaBackground = OxyColors.LightYellow }; 
     plotModel.Series.Add(new FunctionSeries(Math.Sin, -10, 10, 0.1, "sin(x)")); 

     // The root page of your application 
     MainPage = new ContentPage { 
      Content = new PlotView { 
       VerticalOptions = LayoutOptions.Fill, 
       HorizontalOptions = LayoutOptions.Fill, 
       Model = plotModel 
      } 
     }; 
    } 

enter image description here

+1

をそれはXamarin.Forms 2.0.0.xとさえ2.1.0.xとして動作しますが、 Xamarin 2.2.0.31では動作しません。 Oxyplot.Xamarin.AndroidライブラリはAppCompact 23.3.0に対応するために修正する必要があります – danoliv

+0

ええOxyPlot.Xamarin.Forms.1.0.0-unstable1983(Android)は1883年に私の精神が元気になっている –

関連する問題