Fixed
Status Update
Comments
fr...@gmail.com <fr...@gmail.com> #2
Can you provide the below requested information to better understand the issue:
Steps to reproduce
What steps do others need to take in order to reproduce the issue themselves?
Please provide sample application or apk to reproduce the issue.
Also kindly mention the steps to reproduce the issue using the sample application or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
Steps to reproduce
What steps do others need to take in order to reproduce the issue themselves?
Please provide sample application or apk to reproduce the issue.
Also kindly mention the steps to reproduce the issue using the sample application or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output
What do you expect to occur?
Current output
What do you see instead?
fr...@gmail.com <fr...@gmail.com> #3
Hi,
The issue happens 100% of the time when running espresso tests in the "ar_XB" locale. I am working on a sample app to show the issue.
Expected behavior would be successful rendering, but instead the app crashes when rendering the layout.
The issue happens 100% of the time when running espresso tests in the "ar_XB" locale. I am working on a sample app to show the issue.
Expected behavior would be successful rendering, but instead the app crashes when rendering the layout.
al...@gmail.com <al...@gmail.com> #4
Hi,
I have added a sample project athttps://github.com/kkoser/SupportLibRTLCrash . The crash happens when running tests in the "ar_XB" (right to left psuedolocale) locale, but not in other RTL locales. The locale for the test is set in onStart() of the test runner. To reproduce this crash, just run the test in "ExampleInstrumentedTest.java" from Android Studio.
Let me know if there's any more information you need!
I have added a sample project at
Let me know if there's any more information you need!
sm...@gmail.com <sm...@gmail.com> #5
We have passed this defect on to the development team and will update this issue with more information as it becomes available.
am...@google.com <am...@google.com> #6
Looks like a Gradle plugin issue to me.
fr...@gmail.com <fr...@gmail.com> #7
Just to clarify: the stack trace above happens on the device, not at build time?
fr...@gmail.com <fr...@gmail.com> #8
Yes, this is happening on the device at runtime, not at build time.
am...@google.com <am...@google.com> #9
I can reproduce this, but it's something that the support lib should handle, I don't think this had anything to do with tools. It was introduced in support lib 25.x.
Over to you Teng-Hui.
Over to you Teng-Hui.
sm...@gmail.com <sm...@gmail.com> #10
So, this happens to me as well, with a slightly different story.
I was using support library 23.1.1 with Robolectric3.0 then I decided to update to support library 25.0.0. The app seems to work but for the unit tests, it failed on the loginActivityTest, which contains two TextInputLayout.
Caused by: android.content.res.Resources$NotFoundException: File build/intermediates/res/merged/QA/debug/drawable/design_ic_visibility.xml from drawable resource ID #0x7f020166
at android.content.res.Resources.loadDrawable(Resources.java:2096)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)
at org.robolectric.internal.Shadow.directlyOn(Shadow.java:44)
at org.robolectric.shadows.ShadowResources.loadDrawable(ShadowResources.java:505)
at android.content.res.Resources.loadDrawable(Resources.java)
at android.content.res.Resources.getDrawable(Resources.java:700)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:71)
at android.support.design.widget.TextInputLayout.__constructor__(TextInputLayout.java:223)
at android.support.design.widget.TextInputLayout.<init>(TextInputLayout.java)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.careem.adma.activity.BaseActivity.setContentView(BaseActivity.java:86)
at com.careem.adma.activity.LoginActivity.onCreate(LoginActivity.java:108)
at android.app.Activity.performCreate(Activity.java:5243)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)
at org.robolectric.util.ActivityController$1.run(ActivityController.java:122)
at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:304)
at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:45)
at org.robolectric.util.ActivityController.create(ActivityController.java:118)
at org.robolectric.util.ActivityController.create(ActivityController.java:129)
at org.robolectric.util.ActivityController.setup(ActivityController.java:210)
at org.robolectric.Robolectric.setupActivity(Robolectric.java:46)
at com.careem.adma.test.activity.LoginActivityTest.testLoginSuccessWhenDriverVerificationRequired(LoginActivityTest.java:417)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:251)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:188)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:152)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
... 1 more
Caused by: org.xmlpull.v1.XmlPullParserException: XML file build/intermediates/res/merged/QA/debug/drawable/design_ic_visibility.xml line #-1 (sorry, not yet implemented): invalid drawable tag vector
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
at android.content.res.Resources.loadDrawable(Resources.java:2092)
... 55 more
I/ADMAApplication: Activity Resumed: com.careem.adma.activity.LoginActivity
I was using support library 23.1.1 with Robolectric3.0 then I decided to update to support library 25.0.0. The app seems to work but for the unit tests, it failed on the loginActivityTest, which contains two TextInputLayout.
Caused by: android.content.res.Resources$NotFoundException: File build/intermediates/res/merged/QA/debug/drawable/design_ic_visibility.xml from drawable resource ID #0x7f020166
at android.content.res.Resources.loadDrawable(Resources.java:2096)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)
at org.robolectric.internal.Shadow.directlyOn(Shadow.java:44)
at org.robolectric.shadows.ShadowResources.loadDrawable(ShadowResources.java:505)
at android.content.res.Resources.loadDrawable(Resources.java)
at android.content.res.Resources.getDrawable(Resources.java:700)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:71)
at android.support.design.widget.TextInputLayout.__constructor__(TextInputLayout.java:223)
at android.support.design.widget.TextInputLayout.<init>(TextInputLayout.java)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.careem.adma.activity.BaseActivity.setContentView(BaseActivity.java:86)
at com.careem.adma.activity.LoginActivity.onCreate(LoginActivity.java:108)
at android.app.Activity.performCreate(Activity.java:5243)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)
at org.robolectric.util.ActivityController$1.run(ActivityController.java:122)
at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:304)
at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:45)
at org.robolectric.util.ActivityController.create(ActivityController.java:118)
at org.robolectric.util.ActivityController.create(ActivityController.java:129)
at org.robolectric.util.ActivityController.setup(ActivityController.java:210)
at org.robolectric.Robolectric.setupActivity(Robolectric.java:46)
at com.careem.adma.test.activity.LoginActivityTest.testLoginSuccessWhenDriverVerificationRequired(LoginActivityTest.java:417)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:251)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:188)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:152)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
... 1 more
Caused by: org.xmlpull.v1.XmlPullParserException: XML file build/intermediates/res/merged/QA/debug/drawable/design_ic_visibility.xml line #-1 (sorry, not yet implemented): invalid drawable tag vector
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
at android.content.res.Resources.loadDrawable(Resources.java:2092)
... 55 more
I/ADMAApplication: Activity Resumed: com.careem.adma.activity.LoginActivity
il...@google.com <il...@google.com>
al...@gmail.com <al...@gmail.com> #11
To add some more information to the original issue, we are updating from support library 25.0.0 to 25.1.0. Also we do not use Robolectric. I have a hunch these are related issues, but not quite the same.
pe...@gmail.com <pe...@gmail.com> #12
Support lib forget to mark those path data not translatable.
So we will fix it in the support lib.
And we currently believe this only impact those unreal language used for testing purpose like this ar_XB.
So we will fix it in the support lib.
And we currently believe this only impact those unreal language used for testing purpose like this ar_XB.
dn...@google.com <dn...@google.com> #13
A simple update on this:
- I was able to track the error till support 23.2.0, then I find out that the vector was introduced in that version.
- One of the difference I found is that the SDK for robolectric was for API 19. So, I have changed it to API 21 and the tests worked.
So, definitively there is some problem with API 19 since support 23.2.0 (I have enabled the flag "vectorDrawables.useSupportLibrary" as described in this article:https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.u14o96ek9 ) related with vectors, which still occurs on support 25.1.0 with default tools as TextInputLayout.
Good luck!
- I was able to track the error till support 23.2.0, then I find out that the vector was introduced in that version.
- One of the difference I found is that the SDK for robolectric was for API 19. So, I have changed it to API 21 and the tests worked.
So, definitively there is some problem with API 19 since support 23.2.0 (I have enabled the flag "vectorDrawables.useSupportLibrary" as described in this article:
Good luck!
Description
Version used: 25.1.0
Devices/Android versions reproduced on:
Nexus 4 Nougat API 25
The issues happens when the MediaControllerCompat is created with the token of the a MediaSessionCompat which has its lifecycle bind to the application.
Here is the LeakCanary log:
In br.com.me.mediacontrollercompatreprocase:1.0:1.
* br.com.me.mediacontrollercompatreprocase.AnotherActivity has leaked:
* GC ROOT android.os.ResultReceiver$MyResultReceiver.this$0
* references android.support.v4.media.session.MediaControllerCompat$MediaControllerImplApi21$1.this$0 (anonymous subclass of android.os.ResultReceiver)
* references android.support.v4.media.session.MediaControllerCompat$MediaControllerImplApi24.mControllerObj
* references android.media.session.MediaController.mContext
* leaks br.com.me.mediacontrollercompatreprocase.AnotherActivity instance
* Retaining: 48 KB.
* Reference Key: c72cb728-7e92-4fce-959a-b2a856ea7af6
* Device: unknown Android Android SDK built for x86_64 sdk_google_phone_x86_64
* Android Version: 7.1 API: 25 LeakCanary: 1.5 00f37f5
* Durations: watch=5013ms, gc=112ms, heap dump=3237ms, analysis=18682ms
For more details, you could use the following sample to reproduce it.