這是一個非常令人沮喪的問題,我發現了很多無用的文章,尤其是因為它們都指向 Visual Studio 2019。
嘗試運行 Xamarin.UITest 專案時遇到此問題。
System.Exception : Mono Shared Runtime is not supported. This can be resolved by changing the project configuration or using a Release build.
CSPROJ檔案
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|AnyCPU'">
<DebugSymbols>false</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Test</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AotAssemblies>false</AotAssemblies>
<EnableLLVM>false</EnableLLVM>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<BundleAssemblies>false</BundleAssemblies>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>
</PropertyGroup>
特性
uj5u.com熱心網友回復:
OP(Original Poster aka question-asker)似乎在指定 apk 時做的一切都是正確的。
從較早的除錯測驗運行來看,SharedMonoFramework 似乎仍在設備上,與專案的捆綁包 ID 相關聯。
該應用程式需要從設備中完全洗掉。
這些方法之一:
從設備中手動洗掉應用程式。
命令提示符
adb uninstall com.yourcompany.yourapp
(捆綁包 ID)。將設備恢復出廠設定。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/470479.html
標籤:xamarin xamarin.forms xamarin.android xamarin.uitest
下一篇:從串列視圖中洗掉專案(已解決)