Java 找不到类文件

Java 找不到类文件,java,android,gradle,Java,Android,Gradle,我刚刚关闭了我的项目并重新打开它,现在我面临新的错误 错误:无法访问的TintableMageSourceView类文件 未找到android.support.v4.widget.TintableImageSourceView 这一行似乎出现了错误,但我真的不知道为什么: LottieAnimationView animationView = (LottieAnimationView) dialog.findViewById(R.id.animation_view);

我刚刚关闭了我的项目并重新打开它,现在我面临新的错误

错误:无法访问的TintableMageSourceView类文件 未找到android.support.v4.widget.TintableImageSourceView

这一行似乎出现了错误,但我真的不知道为什么:

 LottieAnimationView animationView = (LottieAnimationView) dialog.findViewById(R.id.animation_view);
            //  overlay = (RelativeLayout) dialog.findViewById(R.id.overlay);
            animationView.setImageAssetDelegate(new ImageAssetDelegate() {
                @Override
                public Bitmap fetchBitmap(LottieImageAsset asset) {
                    AssetManager assetManager = context.getAssets();
                    InputStream istr;
                    Bitmap bitmap = null;
                    try {
                        istr = assetManager.open(asset.getFileName());
                        bitmap = BitmapFactory.decodeStream(istr);
                    } catch (IOException e) {
                        // handle exception
                    }
                    return bitmap;
                }
            });
            animationView.setAnimation("data.json");
            animationView.loop(true);
正如我所说的,项目昨天运行正常,我的代码直到今天都没有改变!我今天刚把它重新打开

编辑: 应用程序gradle.build

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/'}
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.8.1'
    }
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias '...'
            keyPassword '...'
            storeFile file('...')
            storePassword '...'
        }
    }
    compileSdkVersion 25
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "ymz.yma.setareitsim_seller"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 5
        versionName "1.0"
        manifestPlaceholders = [onesignal_app_id               : "...",
                                onesignal_google_project_number: "REMOTE"]
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
            signingConfig signingConfigs.config
        }
        debug{
            signingConfig signingConfigs.config
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:25.4.0'
    compile 'com.android.support:support-v4:25.4.0'
    compile 'com.wrapp.floatlabelededittext:library:0.0.6'
    compile 'com.daimajia.easing:library:2.1@aar'
    compile 'com.daimajia.androidanimations:library:2.3@aar'
    compile 'com.truizlop.fabreveallayout:library:1.0.0'
    // compile 'com.bartoszlipinski.flippablestackview:library:1.2.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.ramotion.foldingcell:folding-cell:1.2.1'
    compile 'com.android.support:design:25.4.0'
    compile 'com.mikhaellopez:circularprogressbar:1.1.1'
    compile 'com.github.zcweng:switch-button:0.0.3@aar'
    compile 'com.github.devlight.navigationtabstrip:navigationtabstrip:1.0.4'
    compile 'com.roger.psdloadingview.library:Library:1.0.1'
    compile 'jp.wasabeef:blurry:2.1.1'
    compile 'com.orhanobut:dialogplus:1.11@aar'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.airbnb.android:lottie:2.1.0'
    compile 'com.github.takusemba:spotlight:1.1.3'
    compile('com.github.badoualy:stepper-indicator:1.0.7') { exclude group: 'com.android.support' }
    compile('com.github.ganfra:material-spinner:2.0.0') {
        exclude group: 'com.android.support'
    }
    compile 'me.gujun.android.taggroup:library:1.4@aar'
    compile('com.alibaba.android:ultraviewpager:1.0.6.1@aar') {
        transitive = true
    }
    implementation 'com.squareup.okhttp3:okhttp:3.9.1'
    compile 'com.orhanobut:hawk:2.0.1'
    compile 'com.github.jorgecastilloprz:fabprogresscircle:1.01@aar'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
    compile 'com.onesignal:OneSignal:[3.8.3, 3.99.99]'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'
    implementation 'com.github.bumptech.glide:glide:4.6.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    compile 'com.github.iwgang:countdownview:2.1.6'
    // compile 'nl.psdcompany:duo-navigation-drawer:2.0.7'
    implementation project(':sep')
}
附言:我已经将android studio更新到最新版本,使缓存失效并清理项目,但不起作用

解决了

解决方案:
我刚关掉电脑,让它走了。启动电脑并重新打开后,项目问题已修复!这花了我一整天的时间。

尝试清理和重建项目

我已经面临这种类型的问题,我已经解决了。
只需在Android studio中单击:
文件->使缓存无效/重新启动…

在重新启动和索引后,希望一切都能正常工作


你也可以做
Build->Clean Project
然后
Build->Rebuild Project

谢谢你的回复,我已经清理、重建、失效和清理了缓存!不工作:(发布项目的gradle文件和gradle根文件。@jantursky我编辑了我的问题,尝试更新到最新的SDK版本,即使使用诸如compileSdkVersion 27 buildToolsVersion“27.0.3”依赖项之类的库{implementation'com.android.support:appcompat-v7:27.1.1'implementation'com.android.support:support-v4:27.1.1'implementation'com.android.support:recyclerview-v7:27.1.1'implementation'com.android.support:design:27.1.1'}哦,我明白了,最近几天当我再次打开android studio时,我发现它似乎有些错误。但对我来说,我完成了这些任务,并且工作得非常完美。