android - 包 android.support.annotation 不存在

标签 android

我的gradle代码

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "gt.otomat7"
        minSdkVersion 22
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    androidTestImplementation "com.android.support:support-annotations:27.1.1"
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(':libraries:tess-two')
}

但是我收到关于注释不存在的错误我正在使用 tesseract 库和我的 android studio 版本

Android Studio 3.1.4
Build #AI-173.4907809, built on July 24, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

谢谢你的帮助

最佳答案

以下答案解决了我的问题: https://stackoverflow.com/a/56674446/643156

yarn add --dev jetifier
yarn run jetify

关于android - 包 android.support.annotation 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51807028/

相关文章:

java - Google 日历 Android API 错误 : null

android - 为什么应用程序在尝试选择文本时会崩溃?

android - 通过 gradle 中的任务更改依赖项

android - 如何在android中以编程方式在按钮左侧创建一个带有文本的单选按钮?

Java Android 在连接到服务器时加载微调器

android - 如何在 Crashlytics (Android) 中将开发 session 与生产 session 隔离开来

javascript - 防止 Phonegap notification.navigator 弹出窗口因对话框外的触摸而关闭

android - 持久权限 URI android Q

android - 启动 Spotify Intent

java - 如果复选框已被选中,如何存储?