报错语句为:
1 | _stprintf_s(filepath, _T("%s\\%s"), curpath, CA2T(iniFilePath)); |
改为如下就不报错了:
1 2 | CString iniFilePathT = CA2T(iniFilePath); _stprintf_s(filepath, _T("%s\\%s"), curpath, (LPCTSTR)iniFilePathT); |
人,技术,生活。
报错语句为:
1 | _stprintf_s(filepath, _T("%s\\%s"), curpath, CA2T(iniFilePath)); |
改为如下就不报错了:
1 2 | CString iniFilePathT = CA2T(iniFilePath); _stprintf_s(filepath, _T("%s\\%s"), curpath, (LPCTSTR)iniFilePathT); |
发布后在Android 6.1的手机上安装不了,显示“未安装应用程序”,检查源码发现build.gradle文件中
1 2 3 4 | defaultConfig { minSdkVersion 14 targetSdkVersion 27 } |
于是,把targetSdkVersion改为23,而发布release版时,Signature Versions只选V1(Jar Signature)。
再将生成的apk包在安卓6.1手机上装,顺利安装成功。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | float4x4 worldViewProj : WorldViewProjection; struct VS_INPUT { float3 pos : POSITION; float2 tex : TEXCOORD0; }; struct VS_OUTPUT { float4 pos : POSITION; float2 tex : TEXCOORD0; }; VS_OUTPUT mainVS(VS_INPUT input) { VS_OUTPUT vsOut; vsOut.pos = mul(float4(input.pos, 1), worldViewProj); vsOut.tex = input.tex; // vsOut.tex.xy = vsOut.pos.zw; return vsOut; } texture tex0; sampler2D sample0 = sampler_state { Texture = <tex0>; /* MipFilter = LINEAR; MinFilter = LINEAR; MagFilter = LINEAR; AddressU = CLAMP; AddressV = CLAMP; */ }; float4 mainPS(float2 tex : TEXCOORD0) : COLOR { return tex2D(sample0, tex); // return tex.x / tex.y; } technique technique0 { pass p0 { VertexShader = compile vs_3_0 mainVS(); PixelShader = compile ps_3_0 mainPS(); } } |