elastic / elastic/apm-agent-android

Issue "androidx.core:core:1.16.0 requires AGP 8.6.0 or higher"

Open
#574 5 comments 0 reactions 1 assignee Claimed by @LikeTheSalad View on GitHub
agent-android agent-mobile community documentation triage
Dominant language
Kotlin
Stars
43
Forks
22
Avg merge
2d 1h
Merged PRs (30d)
26

Description

I encountered this issue when integrating to my Android project.
co.elastic.otel.android.agent:co.elastic.otel.android.agent.gradle.plugin:1.1.0

```
4 issues were found when checking AAR metadata:

1. Dependency 'androidx.core:core:1.16.0' requires libraries and applications that
depend on it to compile against version 35 or later of the
Android APIs.

:app is currently compiled against android-34.

Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.3.2 is 34.

Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 35, then update this project to use
compileSdk of at least 35.

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).

2. Dependency 'androidx.core:core:1.16.0' requires Android Gradle plugin 8.6.0 or higher.

This build currently uses Android Gradle plugin 8.3.2.

3. Dependency 'androidx.core:core-ktx:1.16.0' requires libraries and applications that
depend on it to compile against version 35 or later of the
Android APIs.

:app is currently compiled against android-34.

Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.3.2 is 34.

Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 35, then update this project to use
compileSdk of at least 35.

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).

4. Dependency 'androidx.core:core-ktx:1.16.0' requires Android Gradle plugin 8.6.0 or higher.

This build currently uses Android Gradle plugin 8.3.2.
```
The [documentation](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/android/getting-started) says Android Gradle plugin min 7.4.0, but it doesn't align with the error message number 2. Is the documentation not updated or is this something else?

Also does `apm-agent-android` requires targetSdk/compileSdk 35 too?

My setup:
Android Studio Koala
AGP: 8.3.2
Gradle: 8.7
compileSdk 34
minSdk 22
targetSdk 34
JDK 17

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.