GithubHelp home page GithubHelp logo

Comments (10)

castorflex avatar castorflex commented on July 20, 2024

which version of smoothprogressbar are you using?

from smoothprogressbar.

 avatar commented on July 20, 2024

I have the same exact issue. Using version 0.5.2

from smoothprogressbar.

beefmaster avatar beefmaster commented on July 20, 2024

try to use and older api

from smoothprogressbar.

kashban avatar kashban commented on July 20, 2024

I get this too:

java.lang.AssertionError
at android.content.res.BridgeResources.getInteger(BridgeResources.java:425)
at fr.castorflex.android.smoothprogressbar.SmoothProgressDrawable$Builder.initValues(SmoothProgressDrawable.java:657)
at fr.castorflex.android.smoothprogressbar.SmoothProgressDrawable$Builder.(SmoothProgressDrawable.java:629)
at fr.castorflex.android.smoothprogressbar.SmoothProgressBar.(SmoothProgressBar.java:38)
at fr.castorflex.android.smoothprogressbar.SmoothProgressBar.(SmoothProgressBar.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:374)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:99)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:778)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:805)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:778)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:805)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:778)
at android.view.LayoutInflater.inflate(LayoutInflater.java:500)
at android.view.LayoutInflater.inflate(LayoutInflater.java:381)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:400)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:329)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:575)
at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:564)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:564)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:691)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:604)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:80)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:546)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:541)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

from smoothprogressbar.

mradzinski avatar mradzinski commented on July 20, 2024

+1, and everyone using the latest version of the library has exactly the same issue.

from smoothprogressbar.

eeVoskos avatar eeVoskos commented on July 20, 2024

+1

from smoothprogressbar.

Mithrandir21 avatar Mithrandir21 commented on July 20, 2024

This seems to be a reoccurrence of issue #30.
I thought this was fixed by adding the "isInEditMode" fix.
What happened?

from smoothprogressbar.

castorflex avatar castorflex commented on July 20, 2024

I just uploaded a snapshot that should fix the problem. Can you confirm that it's ok for you before I push it on maven central?
You will just have to add the following to your build.gradle to use the snapshots

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
    compile 'com.github.castorflex.smoothprogressbar:library:1.1.0-SNAPSHOT@aar'
}

from smoothprogressbar.

Mithrandir21 avatar Mithrandir21 commented on July 20, 2024

Just added the the lines needed, did "Clean project" and "Rebuild project".
I'm not getting the same error as before and there is a (Android Standard) progress bar shown in the preview, but now there seems to be a message about a missing color.

This is the View I have tried to add (also tried with the first example in the readme page, but got the same result):

<fr.castorflex.android.smoothprogressbar.SmoothProgressBar
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

Here is the top part of the error message in the Preview page:

Missing styles. Is the correct theme chosen for this layout?  Use the Theme combo box above the layout to choose a different layout, or fix the theme style references. 

The following classes could not be instantiated:
- fr.castorflex.android.smoothprogressbar.SmoothProgressBar (Open Class, Show Exception)
 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  

Exception Details
java.lang.NullPointerException
    at android.content.res.BridgeResources.getColor(BridgeResources.java:182)
    at fr.castorflex.android.smoothprogressbar.SmoothProgressDrawable$Builder.initValues(SmoothProgressDrawable.java:672)
    at fr.castorflex.android.smoothprogressbar.SmoothProgressDrawable$Builder.<init>(SmoothProgressDrawable.java:633)
    at fr.castorflex.android.smoothprogressbar.SmoothProgressBar.<init>(SmoothProgressBar.java:38)
    at fr.castorflex.android.smoothprogressbar.SmoothProgressBar.<init>(SmoothProgressBar.java:31)
    at sun.reflect.GeneratedConstructorAccessor632.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:413)
    at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105)
    at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:176)
    .....

Maybe I'm doing something wrong. Let me know if you need me to test anything else.

from smoothprogressbar.

castorflex avatar castorflex commented on July 20, 2024

I've juste re-upload a 1.1.0-SNAPSHOT version, it should be ok now. You will likely need to clear your local maven cache before.

from smoothprogressbar.

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.