Git Product home page Git Product logo

Comments (5)

nenick avatar nenick commented on September 26, 2024

Looks like there are issues with the styling. Did you add the shadow-v4 dependencies?

from androidstudioandrobolectric.

misrakli avatar misrakli commented on September 26, 2024

Indeed the problem is the missing styling. I have a multimodule project setup, where all my business logic (activities, fragments) and presentation layer components (style, resources) are in a android library ('core' in your example), and a very thin app module for configuration of the core library.
In the app module i didn't have a styles.xml, in the app modules AndroidManifest.xml I set the style to a style defined in the core library.
When i am now adding an Activity and a layout to the app module without defining a style in the app module, the tests don't run. This causes the StringIndexOutOfBoundsException.

When I am adding a styles.xml in the app module and set the parent of the style to style defined in the core library the tests are not running. There is an "endless loop" (waited 5 minutes) while trying to run the task testDebug, it doesnt finish.
Edit: After 7 min i got following exception: java.lang.OutOfMemoryError: Java heap space

After adding a styles.xml to the app module and changing the style in the apps AndrodiManifest.xml to the app modules style the test works.
But this is not the way i want to solve the problem, because the app should use the style defined in the core library module. Is this possible?

from androidstudioandrobolectric.

nenick avatar nenick commented on September 26, 2024

I can't reproduce it. I deleted the style.xml from the app module and did a ./gradlew clean app:test and the tests run like expected. Best would be if your fork this project and show me how you have setup your styles to get this issue.

from androidstudioandrobolectric.

misrakli avatar misrakli commented on September 26, 2024

I forked the project but cannot reproduce it for now, too. Maybe I have to add more and more "features" from my real project.The main difference i think is using the v4-support library.

from androidstudioandrobolectric.

nenick avatar nenick commented on September 26, 2024

Perhaps same issue like robolectric/robolectric#1736 ?

from androidstudioandrobolectric.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.