我的 Android Studio 出现以下错误。这是在我最近更新之后。我的Android Studio版本是3.4,Gradle版本是5.5.1,插件版本是3.4.2
这是错误:
Android 资源链接失败
> warn: removing resource com.anirudh.gighub:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value. > F:\gigHub\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1437: error: resource dimen/smallTxtSize (aka com.anirudh.gighub:dimen/smallTxtSize) not found. > F:\gigHub\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1438: error: resource drawable/facebook_signin_btn (aka com.anirudh.gighub:drawable/facebook_signin_btn) not found. > error: failed linking references.**** > > ``` **这是\`build.gradle**
//noinspection GradleCompatible apply plugin: ‘com.android.application’ android { compileSdkVersion 28 defaultConfig { applicationId “com.anirudh.gighub” minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName “1.0” testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner” } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’ } } } dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation ‘com.android.support:appcompat-v7:28.0.0’ testImplementation ‘junit:junit:4.13-beta-3’ implementation ‘com.google.firebase:firebase-auth:18.1.0’ implementation ‘com.facebook.android:facebook-login:5.0.1’ implementation ‘com.github.ybq:Android-SpinKit:1.2.0’ androidTestImplementation ‘com.android.support.test:runner:1.0.2’ androidTestImplementation
enter code here
‘com.android.support.test.espresso:espresso-core:3.0.2’ }
”`
原文由 Anirudh Vashisht 发布,翻译遵循 CC BY-SA 4.0 许可协议
尝试这个
2)删除app下的build文件(F:\gigHub\app\build)
3)清洁项目