在Rails 6中:视差在开发中起作用,但在生产中不起作用

问题描述

以下代码在开发中有效,但不能在生产中使用,我很茫然。我目前正在使用capistrano将生产部署到AWS:

+1

图像 Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName()); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); Log.D(LOG_TAG,"finishAndRestartApp() -> creating pending intent"); PendingIntent pendingIntent = PendingIntent.getActivity(this.getBaseContext(),intent,PendingIntent.FLAG_ONE_SHOT); AlarmManager mgr = (AlarmManager) this.getBaseContext().getSystemService(Context.ALARM_SERVICE); mgr.set(AlarmManager.RTC,System.currentTimeMillis() + 100,pendingIntent); Log.D(LOG_TAG,start finishing mainActivity AND RESTART IT"); finish(); 在正确的目录.container_parallax { text-align: center; background-image:url(background1.jpg); background-repeat:no-repeat; background-size:cover; background-attachment: fixed; font-family:helvetica,arial,sans-serif; line-height:20px; min-height: 90vh; } 中。

在此先感谢您的帮助!

解决方法

我通过进行以下更改background-image: asset-url('background1.jpg');解决了该问题。