Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/403.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Gruntjs angularjs cordova图像未加载_Javascript_Css_Angularjs_Cordova_Gruntjs - Fatal编程技术网

Javascript Gruntjs angularjs cordova图像未加载

Javascript Gruntjs angularjs cordova图像未加载,javascript,css,angularjs,cordova,gruntjs,Javascript,Css,Angularjs,Cordova,Gruntjs,不知道我做错了什么。 这是我的css在grunt之后的样子,但我的实际图像文件名是 backgorund-with-logo.d623d8e2.jpg .containor{ min-height: 100%; background: url('/images/backgorund-with-logo.d623d8e2.jpg') center 30% no-repeat; background-size: 100%; } Gruntile usemin: {

不知道我做错了什么。 这是我的css在grunt之后的样子,但我的实际图像文件名是

backgorund-with-logo.d623d8e2.jpg

.containor{
    min-height: 100%; 
    background: url('/images/backgorund-with-logo.d623d8e2.jpg') center 30% no-repeat;
    background-size: 100%;
}
Gruntile

usemin: {
            html: ['<%= yeoman.dist %>/{,*/}*.html'],
            css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
            options: {
                assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images']

            }
        },
imagemin: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/images',
                    src: '{,*/}*.{png,jpg,jpeg,gif}',
                    dest: '<%= yeoman.dist %>/images'
                }]
            }
        },
filerev: {
            dist: {
                src: [
                    '<%= yeoman.dist %>/scripts/{,*/}*.js',
                    '<%= yeoman.dist %>/styles/{,*/}*.css',
                    '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
                    '<%= yeoman.dist %>/styles/fonts/*'
                ]
            }
        },
但当我尝试在android设备上运行并通过chrome进行检查时 无法加载资源file:///images/backgorund-with-logo.d623d8e2.jpg

.containor{
    min-height: 100%; 
    background: url('/images/backgorund-with-logo.d623d8e2.jpg') center 30% no-repeat;
    background-size: 100%;
}

请帮助

这不是最好的方法,但我通过从filerev中删除“/images/{,/}.{png,jpg,jpeg,gif,webp,svg}”阻止了缩小图像。如果有更好的方法,请让我们知道

能否验证图像名称为backgorund-with-logo.jpg而不是background-with-logo.jpg。这个问题也是android特有的吗?文件名没问题。我已查看图像文件夹,图像已存在。android和iOS都会出现这种情况,如果我没记错的话,它应该从中加载图像file:///android_asset/www/images/... 但不知道怎么做