Xamarin错误:Visual Studio中新的Android项目出现“ libmonosgen-2.0.so找不到”

时间:2018-10-05 23:09:55

标签: android visual-studio xamarin

上面的问题出现在空白的新项目中。

Logcat的全文:

A / MonoDroid(13053):共享的运行时初始化错误:dlopen失败:未找到库“ /data/app-lib/Mono.Android.DebugRuntime-1/lib/libmonosgen-2.0.so”

我检查了“ /data/app-lib/Mono.Android.DebugRuntime-1/lib/”文件夹,其中包含“ libmonosgen-32bit-2.0.so”库, “ Mono.Android.DebugRuntime-1.apk”具有包含以下子文件夹的“ lib”文件夹:

  • arm64-v8a
  • armeabi
  • armeabi-v7a
  • x86
  • x86_64

全部包含“ libmonosgen-32bit-2.0.so”,“ 64”文件夹也包含“ libmonosgen-64bit-2.0.so”。

我该如何解决? 似乎无法重命名.so库,因此它不包含从我的应用程序到“ -32bit”库的那个“ -32bit”后缀或点。

我的参数和.csproj文件:


VS 2013
Xamarin 4.0.0
Xamarin.Android 6.0.0
minSdk = 16
targetSdk = 26
构建工具28.0.2
Java版本“ 1.8.0_91”


<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{B4958FCD-ECDE-47C2-B150-031DC951714A}</ProjectGuid>
    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>App3</RootNamespace>
    <AssemblyName>App3</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <AndroidApplication>true</AndroidApplication>
    <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
    <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
    <AndroidSupportedAbis>armeabi,armeabi-v7a</AndroidSupportedAbis>
    <TargetFrameworkVersion>v4.4</TargetFrameworkVersion>
    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
    <AndroidLinkMode>None</AndroidLinkMode>
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
    <AndroidLinkMode>SdkOnly</AndroidLinkMode>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Mono.Android" />
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainActivity.cs" />
    <Compile Include="Resources\Resource.Designer.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="GettingStarted.Xamarin" />
    <None Include="Resources\AboutResources.txt" />
    <None Include="Assets\AboutAssets.txt" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\layout\Main.axml" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\Strings.xml" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\drawable\Icon.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Properties\AndroidManifest.xml" />
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
     Other similar extension points exist, see Microsoft.Common.targets.
    <Target Name="BeforeBuild">
    </Target>
    <Target Name="AfterBuild">
    </Target>
 -->
</Project>

谢谢。

(试图将其发布在论坛上,但不允许我提出问题)

0 个答案:

没有答案