我刚关闭了我的项目并重新打开它,现在我正面临新的错误!
错误:无法访问TintableImageSourceView类文件 找不到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);
正如我所说,昨天项目工作正常,直到今天我的代码没有任何变化!我今天刚刚重新打开它。
编辑: app 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')
}
P.S:我已经将android studio更新到最新版本,使缓存失效并清理项目但是没有工作!
已解决!
解决方案: 我刚刚关机了,就放手吧。启动电脑后重新打开项目问题得到解决!我花了整整一天时间。
答案 0 :(得分:0)
尝试清理和重建项目
答案 1 :(得分:0)
我已经面对这种类型的问题而且我解决了这个问题
只需点击Android工作室:File -> Invalidate Caches / Restart...
重启和索引后,希望一切都能正常工作。
您还可以Build -> Clean Project
然后Build -> Rebuild Project