Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/303.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
Java Cucumber在Android Studio中找不到步骤定义_Java_Android_Cucumber - Fatal编程技术网

Java Cucumber在Android Studio中找不到步骤定义

Java Cucumber在Android Studio中找不到步骤定义,java,android,cucumber,Java,Android,Cucumber,我已经将Cucumber与Android Studio集成。Android Studio似乎可以找到放置步骤定义的正确文件,因为它建议将步骤定义从.feature文件实现到正确的.java文件中。但是,当我运行该功能时,它表示步骤未定义 以下是等级相关性: dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcom

我已经将Cucumber与Android Studio集成。Android Studio似乎可以找到放置步骤定义的正确文件,因为它建议将步骤定义从
.feature
文件实现到正确的
.java
文件中。但是,当我运行该功能时,它表示步骤未定义

以下是等级相关性:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.jakewharton:butterknife:10.2.1'
    implementation 'com.google.android.material:material:1.2.0-alpha03'
    implementation 'com.google.android.libraries.places:places:2.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-wallet:18.0.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'

    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.3.0-alpha03'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'info.cukes:cucumber-junit:1.0.14'
    androidTestImplementation 'info.cukes:cucumber-android:1.2.5'
    androidTestImplementation 'info.cukes:cucumber-picocontainer:1.2.5'
}
黄瓜构型

package app.waxbee.stepdefinitions;

import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(features = "resources/features", glue = "app.waxbee.stepdefinitions")
public class CucumberTestCase {

}
项目结构:

我是这个框架的新手,所以如果你看到任何可以改进的地方,我非常感谢你的教导。先谢谢你