由于此错误,我无法在 var cultureInfo = new CultureInfo("ar-SA");
cultureInfo.DateTimeFormat.Calendar = new GregorianCalendar();
var requestCulture = new RequestCulture(cultureInfo);
Thread.CurrentThread.CurrentCulture = requestCulture;
Thread.CurrentThread.CurrentUICulture = requestCulture;
中运行 @SuppressLint("PrivateApi")
public IMyAudioService getService(Context mContext) {
IMyAudioService mService = null;
Method method = null;
try {
method = Class.forName("android.os.ServiceManager").getMethod("getService", String.class);
IBinder binder = (IBinder) method.invoke(null, "YOUR_METHOD_NAME");
if (binder != null) {
mService = IMyAudioService .Stub.asInterface(binder);
}
} catch (NoSuchMethodException | ClassNotFoundException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
return mService;
}
应用程序,而我可以从Net Core
启动容器。
docker-compose
我的dockerfile
直接使用Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
(我直接使用dockerfile
目录),所以不需要.dll
,publish
。
build
我跑步:
restore
,它可以工作。
但是当我从FROM microsoft/dotnet:aspnetcore
WORKDIR /app
COPY ./publish .
ENTRYPOINT ["dotnet", "Server.dll"]
EXPOSE 8202
运行它时:
docker build -t mp .
docker run --name mp0 -d myimg
我尝试使用:compose
, mp:
image: mp
container_name: mp0
build: ./mpbuild
ports:
- 8302:8202
,aspnetcore
无济于事,我不断被问到aspnetcore-build
的问题。
PS:该应用的版本为aspnetcore-runtime
。
答案 0 :(得分:1)
尝试将microsoft/dotnet:aspnetcore
更改为microsoft/dotnet:2.2-sdk