Я создал новый проект в Android Studio, но когда я запускаю приложение для его тестирования, оно показывает следующую ошибку:
An issue was found when checking AAR metadata:
1. Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.2 is 33.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 34, then update this project to use
compileSdk of at least 34.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
Я не знаю, что происходит, но сейчас я использую последние обновления и библиотеки.
Это зависимости:
Это зависимости:
Я не знаю, что происходит, но сейчас я использую последние обновления и библиотеки.
Это зависимости:
p>
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.github.bumptech.glide:glide:4.16.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Это код:
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import java.util.ArrayList;
public class AllBook extends AppCompatActivity {
private RecyclerView bookRecView;
BookRecAdapter bookAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_book);
bookAdapter = new BookRecAdapter(this);
bookRecView = findViewById(R.id.booksRecView);
bookRecView.setAdapter(bookAdapter);
bookRecView.setLayoutManager(new GridLayoutManager(this, 2));
ArrayList books = new ArrayList();
books.add(new Book(1, "1Q84", "Haruki Murakumi", 135, "https://i.gr-assets.com/images/S/compre ... 357575.jpg", "1Q84 is a novel written by Japanese writer Haruki Murakami, first published in three volumes in Japan in 2009–10."
, "1Q84 is a novel written by Japanese writer Haruki Murakami, first published in three volumes in Japan in 2009–10. It covers a fictionalized year of 1984 in parallel with a \"real\" one. The novel is a story of how a woman named Aomame begins to notice strange changes occurring in the world"));
bookAdapter.setBooks(books);
}
}
Подробнее здесь: https://stackoverflow.com/questions/772 ... ps-that-de
Зависимость «androidx.activity:activity:1.8.0» требует, чтобы библиотеки или приложения, которые зависят от нее, компили ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение