Fixed
Status Update
Comments
d....@gmail.com <d....@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?
am...@google.com <am...@google.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.
an...@gmail.com <an...@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!
am...@google.com <am...@google.com> #5
We have passed this defect on to the development team and will update this issue with more information as it becomes available.
d....@gmail.com <d....@gmail.com> #6
Looks like a Gradle plugin issue to me.
d....@gmail.com <d....@gmail.com> #7
Just to clarify: the stack trace above happens on the device, not at build time?
am...@google.com <am...@google.com> #8
Yes, this is happening on the device at runtime, not at build time.
d....@gmail.com <d....@gmail.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.
do...@gmail.com <do...@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
gi...@gmail.com <gi...@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.
tw...@gmail.com <tw...@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.
mr...@gmail.com <mr...@gmail.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!
[Deleted User] <[Deleted User]> #14
We're seeing this problem only in our release build using ProGuard, we're not using any vectors ourselves.
[Deleted User] <[Deleted User]> #15
To clarify, we're getting this issue when upgrading from support library 25.0.0 to 25.1.0. No problems on 25.0.0
[Deleted User] <[Deleted User]> #16
This should be fixed in the coming 25.1.* support lib version. Note that this should only affect when testing on pseudo-locale like ar_XB.
[Deleted User] <[Deleted User]> #17
Issue is fixed and released in 25.2.0 support library.
Description
Version used: 25.1.0
Theme used: Theme.AppCompat.Light.DarkActionBar
Devices/Android versions reproduced on: every devices I tested on, for example : Sony Xperia Z3 tablet, Samsung Galaxy Tab S2.
It seems related to other issues being reported about fragment replace transactions, but this one does not use the replace method.
Steps to reproduce :
- Add a fragment with a simple transaction :
getSupportFragmentManager()
.beginTransaction()
.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)
.add(R.id.fragment_container, new TestFragment())
.commit()
- Remove the fragment using a simple remove, and just after start a new activity :
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container);
if (fragment != null) {
getSupportFragmentManager()
.beginTransaction()
.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)
.remove(fragment)
.commit();
startActivity(new Intent(this, MainActivity.class));
}
- Go back to the old activity
What should happen : the fragment that was added should not be here anymore.
What happens : the fragment is still here. But the thing is it's only some sort of "ghost view" : it's impossible to reach it in debug using the view hierarchy. I even tried to activate the debug option "show layout bounds", which does not shows the bound on the fragment view. The view is not clickable, if I call removeAllViews() on the container it's still here.
Another thing : even with this view still here, if I re-add a fragment it will be added below the "ghost view". Everything works, but the old view is still here.
I attached a sample project to reproduce this issue. The "remove fragment" button is just here to validate the behaviour without starting another activity. You can see the bug using :
- "Add fragment"
- "Remove fragment and start activity"
- Press the back button
The old fragment is still here. If you press the add fragment button, another fragment will appear behing the old fragment, which should not be possible.
If you use the "show layout bounds" option, the bug is really visible :
- Start from scratch (kill the app)
- "Add fragment"
- Enable the "show layout bounds" option.
- "Remove fragment and start activity"
- Press the back button
Here everything seems normal except for the fragment still being here. But if you disable the "show layout bounds" option, the fragment view will stay unchanged, with layout bounds displayed. As if it were a cached view not recognized by the system.
I also attached a screenshot of this behavior. You can see the "show layout bounds" option is disabled, but it still shows on the fragment view.
All this does not happen with support lib 25.0.1.