gpt4 book ai didi

android - 无法解析AndroidJunit4

转载 作者:行者123 更新时间:2023-12-03 05:44:12 25 4
gpt4 key购买 nike

我已经在所有论坛上搜索过这个问题,但解决方案似乎对我没有帮助。它们都涉及将我的测试移动到我拥有的 androidTest

这是我的文件夹结构的图片

enter image description here

这是我的 build.gradle

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
mavenCentral()
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath "com.newrelic.agent.android:agent-gradle-plugin:5.+"
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'newrelic'

repositories {
jcenter()

flatDir {
dirs '../../xxx-native-app-android/trunk/baseline/UrbanAirshipLib/aars'
}

maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}


android {
useLibrary 'org.apache.http.legacy'
signingConfigs {
config {
keyAlias 'xxxkey'
keyPassword ''
storeFile file('../app/key/xxx_key.jks')
storePassword ''
}
}

compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 26
// signingConfig signingConfigs.gtn
signingConfig signingConfigs.config
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
xxx {
applicationId "com.bluestem.xxx.android"
// both flavor should have same version and incremental
versionCode 66
versionName "1.1.3"
// signingConfig signingConfigs.gtn
}
yyy {
applicationId "com.bluestem.yyy.android"
versionCode 21
versionName "1.1.3"
// signingConfig signingConfigs.gtn
}
}
lintOptions {
abortOnError false
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(path: ':custompin', configuration: 'default')
compile project(path: ':view_pager_indicator_lib', configuration: 'default')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:support-v13:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.urbanairship:urbanairship-lib:6.0.2@aar'
compile 'org.parceler:parceler-api:1.0.1'
compile 'com.wdullaer:materialdatetimepicker:1.4.2'
compile 'com.newrelic.agent.android:android-agent:5.+'
annotationProcessor "org.parceler:parceler:1.0.1"
compile('com.crashlytics.sdk.android:crashlytics:2.5.6@aar') {
transitive = true;
}

// https://mvnrepository.com/artifact/com.android.support.test/runner
androidTestCompile 'com.android.support:support-annotations:26.1.0'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}

我已经尝试了我能想到的一切,重建项目,一切的不同版本..

有什么帮助吗?

最佳答案

跟着这些步骤:

  • 为应用程序打开模块设置
  • 在依赖项选项卡下单击“+”并一一添加依赖项
  • 点击申请

  • 这应该有效。

    关于android - 无法解析AndroidJunit4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50916143/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com