'io.cucumber.core.gherkin.FeatureParserException: Failed to parse resource at

I am trying to build a framework using io.cucumber but gives me an error which mentions in the title

TestRunner File

package Test_Runner;


import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;



@RunWith(Cucumber.class)
@CucumberOptions(
        monochrome = true,
        features = "src/test/resources/features",
        plugin = { "pretty","html:target/cucumber-pretty",
                "json:target/cucumber.json" },
        glue = "Test_Runner/Steps",
        dryRun = true)
public class TestRunner {
}

When I am running with an older version of cucumber dependency it's not giving error.

The error shows when I run is as below

io.cucumber.core.gherkin.FeatureParserException: Failed to parse resource at: file:///G:/Testing/Projects/RanajiAgro/src/test/resources/features/Login.feature

    at io.cucumber.core.gherkin.vintage.GherkinVintageFeatureParser.parseGherkin5(GherkinVintageFeatureParser.java:40)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source