2017-05-17 2 views
0

Xamarin Forms를 사용하여 응용 프로그램을 개발하고 있습니다. 데이터베이스가 필요하므로 Frank A.Krueger가 NuGet 패키지 관리자를 통해 sqlite-net-pcl을 설치합니다. PCL 프로젝트에서 연결을 시도합니다 :Windows Phone 8.1 응용 프로그램에서 SQLite 데이터베이스에 연결하는 중 오류가 발생했습니다.

ISQLiteHelper sqlLiteHelper = DependencyService.Get<ISQLiteHelper>(); 
string pathToDatabaseFile = sqlLiteHelper.GetLocalDatabaseFilePath(databaseFilename); 
this.database = new SQLiteConnection(pathToDatabaseFile); 

예외가 있습니다.

"Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

는 좀 답변 다운로드 다음에 내가 내 WinPhone 8.1 프로젝트에 다음 참조 추가보다 sqlite-wp81-winrt-3180000.vsix 설치 : Reference Manager로 -> 윈도우 폰 8.1 -> 확장이 -> 윈도우 8.1에 대한 SQLite는 것은하지만 도움이되지 않았다을 나를. 나는 똑같은 오류가있다.

대상 플랫폼을 x86으로 변경했습니다. 내 PC가이 같은 X64 내 대상 플랫폼을 변경하면 내가 그 오류가 발생했습니다

"Any CPU" is not supported by the referenced SDK "Microsoft.VCLibs, Version=12.0". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, ARM". App1.WinPhone

Reference manager screenshot

NuGet screenshot

enter image description here

: 모든 CPU의 경우 오류가 발생합니다.

"X64" is not supported by the referenced SDK "Microsoft.VCLibs, Version=12.0". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, ARM". App1.WinPhone

"X64" is not supported by the referenced SDK "SQLite.WP81, Version=3.18.0". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, ARM". App1.WinPhone

답변

0

해결책 : 당신은 Oustein KROG, 프랭크 크루거, 팀 호이어 대신 sqlite-net-pcl으로 SQLite.Net-PCL을 사용할 수 있습니다.

컬렉션의 생성이 하나 같이 표시됩니다

this.database = new SQLiteConnection(databaseFilename); 
관련 문제