Status Update
Comments
es...@google.com <es...@google.com>
di...@google.com <di...@google.com> #4
com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Descriptors.java)
com.android.build.gradle.internal.cxx.logging.CxxLogging.<clinit>(CxxLogging.java:82)
com.android.build.gradle.internal.cxx.logging.LoggingMessage.getDescriptor(LoggingMessage.java:110)
com.android.build.gradle.internal.cxx.logging.LoggingMessage.hashCode(LoggingMessage.java:489)
java.util.HashMap.hash(HashMap.java:340)
java.util.HashMap.containsKey(HashMap.java:592)
java.util.HashSet.contains(HashSet.java:204)
This logic was deduplicating messages (including chatty 'info' messages). This deduplication shouldn't be needed anymore so I removed it.
I don't know how the 80ms from
di...@google.com <di...@google.com>
cm...@google.com <cm...@google.com> #6
Yes, target sdk defaults to min SDK in AGP if it's not set (this mimics the platform's behavior)
We have discussed changing that default in AGP to the compileSdkVersion, especially for library tests, but it's a behavioural breaking change so we'd want to wait for a major version
em...@google.com <em...@google.com> #7
Then, at the moment, I believe we should fix the template for File > New > New Module..."
so that it sets targetSdk
field (similar to how the default Empty Activity template sets targetSdk = compileSdk
).
em...@google.com <em...@google.com> #8
But then I discover these:
=> Remove targetSdkValue from gradle.builds for library modulesb/234472788 http://ag/21487220 => Don't set targetSdk in libraries
...which conflicts with what I want/need here. How can we set targetSdk
for an instrumented test inside a library module?
em...@google.com <em...@google.com> #9
+cc alex and james
di...@google.com <di...@google.com> #10
HI,
I have created a bug to track changing the default targetSdk to compileSdk for AGP 9.0.
an...@google.com <an...@google.com> #11
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 14
- Android Gradle Plugin 8.3.0-alpha14
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Repro instructions:
nativelib
module that has native code. Nothing special.NativeLibInstrumentedTest
targetExpected result:
Actual result:
Error message on the build window:
Logs and project are attached.