我试图在官方instruction之后在Heroku中部署Django应用程序。项目结构如下,
值得一提的是,我可以从class Utility {
static void alertDialogShow(Context context, String title, String message, OnClickListener listener) {
final AlertDialog alertDialog = new AlertDialog.Builder(context).create();
alertDialog.setTitle(title);
alertDialog.setMessage(message);
alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", listener);
alertDialog.show();
}
static void alertDialogShow(Context context, String title, String message) {
alertDialogShow(context, title, message, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
}
}
文件夹src
本地运行heroku。此外,应用创建工作正常,heroku local web
。我尝试使用命令heroku create
我在终端中收到错误消息
git push heroku master
我在SOF中看到了类似的问题,但是,它们似乎都没有任何帮助。例如,我将remote: -----> Failed to detect app matching https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz buildpack
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sheltered-sea-46201.
remote:
To https://git.heroku.com/sheltered-sea-46201.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sheltered-sea-46201.git'
文件转移到答案中建议的requirements.txt
文件夹中,再次src
,这是无效的。我应该怎么做才能解决这个问题?
注意:
当有人建议使用pip freeze
时,我试着收到消息,