Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
ma...@tomtom.com <ma...@tomtom.com> #3
Amended the behavior slightly to find the best match from the requested style.
ar...@google.com <ar...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 6e7a1ffacde6ead3acbff09514503e896d3c8bf3
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Mar 29 11:04:25 2022
TypefaceCompatApi29 finds best from requested style
This causes fonts closer to the desired style to be chosen on
resolution.
Test: ./gradlew :core:core:cAT
Bug: b/194553426
Relnote: "TypefaceCompat will now respect both requested and loaded
style information on API 29+. This is a behavior change when the loaded
fonts are not FontWeight.Normal or FontWeight.Bold, as the actual loaded
weight and style will be used. For more information see b/194553426 "
Change-Id: I1f90279afa68afa450bb98eb7c5237464c5f57d8
M core/core/src/androidTest/java/androidx/core/graphics/TypefaceCompatTest.java
M core/core/src/androidTest/java/androidx/core/content/res/ResourcesCompatTest.java
A core/core/src/androidTest/res/font/samplexmlfont_medium.xml
M core/core/src/main/java/androidx/core/graphics/TypefaceCompatApi29Impl.java
https://android-review.googlesource.com/2047984
Branch: androidx-main
commit 6e7a1ffacde6ead3acbff09514503e896d3c8bf3
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Mar 29 11:04:25 2022
TypefaceCompatApi29 finds best from requested style
This causes fonts closer to the desired style to be chosen on
resolution.
Test: ./gradlew :core:core:cAT
Bug:
Relnote: "TypefaceCompat will now respect both requested and loaded
style information on API 29+. This is a behavior change when the loaded
fonts are not FontWeight.Normal or FontWeight.Bold, as the actual loaded
weight and style will be used. For more information see
Change-Id: I1f90279afa68afa450bb98eb7c5237464c5f57d8
M core/core/src/androidTest/java/androidx/core/graphics/TypefaceCompatTest.java
M core/core/src/androidTest/java/androidx/core/content/res/ResourcesCompatTest.java
A core/core/src/androidTest/res/font/samplexmlfont_medium.xml
M core/core/src/main/java/androidx/core/graphics/TypefaceCompatApi29Impl.java
ar...@google.com <ar...@google.com> #6
Since it's not listed here, repeating:
This was solved by github contribution
ar...@google.com <ar...@google.com>
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #8
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
nk...@google.com <nk...@google.com> #9
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
ma...@tomtom.com <ma...@tomtom.com> #10
Looks good, thanks
Description
E/TestExecutor: Fatal exception when running tests
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/DialogFragment;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.DialogFragment" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.extension.runnercrashapp.test-2/base.apk"],nativeLibraryDirectories=[/data/app/com.extension.runnercrashapp.test-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
it happens only if module from gradle dependency is excluded, for example:
implementation ("com.google.android.gms:play-services-analytics:11.0.4") {
exclude group: 'com.android.support', module: 'support-v4'
}
Tested on devices with Android 5 and 7.
With version 0.5 of com.android.support.test:runner it wasn't happening.
To reproduce, run android tests from android studio or gradle connectedCheck
Small example project is available here: