在Android SDK 28+更新之后,我将gradle更新为5.5.1版,并将gradle插件更新为3.4.2。
我收到以下错误,这非常令人讨厌,因为我不认为我的代码是错误的!
“Android资源链接失败
警告:删除资源com.anirudh.gighub:string / com_facebook_loginview_logged_in_using_facebook_f1gender,而无需默认值。
F:\ gigHub \ app \ build \ intermediates \ incremental \ mergeDebugResources \ merged.dir \ values \ values.xml:1437:error:resource dimen / smallTxtSize(aka com.anirudh.gighub:dimen / smallTxtSize)未找到。
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)未找到。
错误:链接引用失败。”
Here is the 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 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Here is the App Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.anirudh.gighub">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString">
<activity android:name=".MainActivity">
</activity>
<activity android:name=".Register" />
<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
</manifest>*
最佳答案
尝试文件->使高速缓存无效/重新启动->使无效并重新启动