首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:包android.test不存在

错误:包android.test不存在
EN

Stack Overflow用户
提问于 2019-01-14 15:55:08
回答 1查看 2.3K关注 0票数 1

我不能编译我的项目!请帮帮我。

代码语言:javascript
运行
复制
Error:(4, 20) error: package android.test does not exist
Error:(9, 38) error: cannot find symbol class ApplicationTestCase
Error:Execution failed for task ':app:compileDebugAndroidTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

在Android存根1.4上。

代码语言:javascript
运行
复制
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.mkurbanov.lebap_kwartira"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.daimajia.easing:library:2.0@aar'
compile 'com.daimajia.androidanimations:library:2.3@aar'
compile 'com.github.esafirm.android-image-picker:imagepicker:1.13.1'
// for experimental rx picker
compile 'com.github.esafirm.android-image-picker:rximagepicker:1.13.1'
}

//一些评论,请帮助我,我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!请帮帮我我真的需要这个!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-02-01 12:55:56

我在AndroidStudio3.3上也有类似的问题。在使用"targetSdkVersion 28“时,当我试图运行应用程序时,我得到了消息"error: package android.test不存在”。编译是可能的。将targetSdkVersion更改为27是解决办法

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54184867

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档