Я обновил свою сборку и целевую версию до 28 (пирог) и заменил соответствующие зависимости.Теперь мой проект говорит, что Symbol не найден на AppCompatActivity
.Я пытался
- Очистить проект
- Перестроить проект
- Отменить кеширование / перезапустить
Но результат тот же.Более того, когда я пытаюсь Ctrl + Пробел после расширения ключевого слова в классе активности, предложение "AppCompatActivity
отсутствует.Я пытался выяснить, присутствует ли он в папке libraries
, присутствует ли он там.
Теперь, что я должен сделать, чтобы это работало?Если есть какие-либо варианты / альтернативы с androidx
libs, пожалуйста, дайте мне знать.Вот мой полный build.gradle
файл
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.invogen.messagingapp"
minSdkVersion 16
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'
// implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// implementation 'com.android.support:design:28.0.0'
// implementation 'com.android.support:support-v4:28.0.0'
// Libs for newer API 28
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
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'
// Libs for Firebase Functionality
implementation 'com.google.firebase:firebase-core:16.0.5'
// implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-storage:16.0.4'
// Lib for Firebase UI Elements
implementation 'com.firebaseui:firebase-ui-database:4.2.1'
// Libs for QR Code
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
// Lib for Circle Image View (Profile Image)
implementation 'de.hdodenhof:circleimageview:2.2.0'
// Lib for Loading Images
implementation 'com.squareup.picasso:picasso:2.71828'
//Lib for Cropping Images
api 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
}
apply plugin: 'com.google.gms.google-services'
Некоторые другие посты предлагают добавить следующие два параметра в Manifest
файл
android:appComponentFactory="anystrings be placeholder"
tools:replace="android:appComponentFactory"
Но с этими двумя строками проект синхронизируется с множественной ошибкойи Android Studio сообщает:
Компиляция не удалась;подробности смотрите в сообщении об ошибке компилятора.
Если мне нужно добавить больше деталей к вопросу, пожалуйста, дайте мне знать.