2016-04-26 17 views
0

AndroidスタジオのAndroidアプリをVisual Studio 2015/Xamarinに移植しようとしています。私はプロジェクトを実行しようと私が取得: 'RequiresPermission'タイプのアノテーションメソッド 'anyOf()'が見つかりません:

Android application is debugging. 
    The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true). 

Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration. 

は、私がメインクラスに [Activity(MainLauncher = true)]を追加し、正しいように見える Build->Configurationをチェックするが、これらは効果がありません。

私はこの警告を得る:

Cannot find annotation method 'anyOf()' in type 'RequiresPermission': 
class file for android.support.annotation.RequiresPermission not found 
MyApplication.Native.Droid C:\Users\allelopath\AppData\Local\Xamarin\GooglePlayServices.Maps\8.4.0\embedded\classes.jar(com/google/android/gms/maps/GoogleMap.class) 

私もこの警告を得る:

Warning  
Found conflicts between different versions of the same dependent assembly. 
In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; 
otherwise, add the following binding redirects to the "runtime" node in the application configuration file: 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
<dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /> 
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly></assemblyBinding> 
Acquaint.Native.Droid   

を私はそれが示唆するようにダブルクリックして、それが求められます。

Do you want to fix these conflicts by adding binding redirrect records in the application configuration file? 

私は[はい]をクリックします。これは最終的には何の効果もありません。再構築して実行しようとすると、警告が再び表示されます。

Androidスタジオで実行していたデバイスのアプリをアンインストールしましたが、これは効果がありませんでした。

あなたは何をお勧めしますか?

答えて

1

私はあなたのソリューションを右クリックして、構成プロパティーに行き、正しいプロジェクトがすべてビルドされ、アンドロイドプロジェクトの展開ボックスがチェックされていることを確認します。これはちょうど悪いXamarinの傾向です。

自分自身で2番目の警告があります。これは、Androidサポートライブラリでsdkバージョン23をコンパイルする必要があるからです。Googleマップパッケージでは、これらの新しい注釈を使用する必要があります。私は15のminSdkVersionで、このエラーのために何の問題も発生していないので、私はちょうどそれと一緒に暮らしています。

私は同じ依存アセンブリの警告を持っていると私は何が起こっていると思うものは、何かより.netプリミティブへの新しい参照を使用している1つのプロジェクトがあります。ちょうど推測ですが、私はこれを幸せにすることについても心配していません。

関連する問題