Comments (10)
which version of smoothprogressbar are you using?
from smoothprogressbar.
I have the same exact issue. Using version 0.5.2
from smoothprogressbar.
try to use and older api
from smoothprogressbar.
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.
+1, and everyone using the latest version of the library has exactly the same issue.
from smoothprogressbar.
+1
from smoothprogressbar.
This seems to be a reoccurrence of issue #30.
I thought this was fixed by adding the "isInEditMode" fix.
What happened?
from smoothprogressbar.
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.
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.
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)
- Unable to update to CircularProgressBar 1.3.0 HOT 3
- how to set the color of the Circularprogressbar HOT 2
- Not able to build HOT 1
- Can't convert to dimension: type=0x1 HOT 1
- Determinate Mode HOT 1
- Increase the Storke Width HOT 1
- Caused by android.content.res.Resources$NotFoundException
- Error inflating class fr.castorflex.android.circularprogressbar.CircularProgressBar on AS 3.2.1
- Google Play Store link do not work HOT 2
- Df
- Support Android X HOT 1
- Gui
- Is this library deprecated because of not supporting AndroidX or someother reason is there? HOT 1
- JCenter replacement HOT 3
- Started lagging on Samsung phones HOT 1
- Release 1.4
- Determinate style for Horizontal HOT 1
- How to set background to transparent if used as non-intermediate progress bar HOT 1
- Not working after upgrading to api level 26 with android studio 3.0: Error inflating class fr.castorflex.android.circularprogressbar.CircularProgressBar HOT 10
- is it possible to use Smooth Progressbar in a Notification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smoothprogressbar.