Giter Club home page Giter Club logo

Comments (11)

anastr avatar anastr commented on August 23, 2024

Try to build your project, build -> Make Project , or CTRL + F9.

from speedview.

Rainbow87 avatar Rainbow87 commented on August 23, 2024

I tried to Make Project but still error

from speedview.

anastr avatar anastr commented on August 23, 2024

if you have the same error with all Speedometers, that means you have problem with your project, maybe it need clone project or Gradle sync.
if not, and this is real render bug, the library must use isInEditMode() in Deluxe​Speedometer and RaySpeedometer , this is my mistake.
It will be fix in the next version.

Thanks.

from speedview.

anastr avatar anastr commented on August 23, 2024

fixed in the new Version 1.1.5.

from speedview.

Rainbow87 avatar Rainbow87 commented on August 23, 2024

i compiled with version 1.1.5 (compile 'com.github.anastr:speedviewlib:1.1.5') but the still render errors with not only DeluxeSpeedView but also all of other views. i tried to clean and make project again but can not fix.

image

java.lang.NoSuchFieldError: Speedometer_sv_speedometerMode
at com.github.anastr.speedviewlib.base.Speedometer.initAttributeSet(Speedometer.java:78)
at com.github.anastr.speedviewlib.base.Speedometer.(Speedometer.java:64)
at com.github.anastr.speedviewlib.DeluxeSpeedView.(DeluxeSpeedView.java:44)
at com.github.anastr.speedviewlib.DeluxeSpeedView.(DeluxeSpeedView.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:475)
at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:262)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:220)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:186)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:334)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:345)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:245)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:197)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:902)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:854)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:368)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:567)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:549)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:863)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:549)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$1(RenderTask.java:680)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

from speedview.

anastr avatar anastr commented on August 23, 2024

Show me the XML code please.

from speedview.

Rainbow87 avatar Rainbow87 commented on August 23, 2024

<com.github.anastr.speedviewlib.DeluxeSpeedView
android:id="@+id/Home_spv_SpeedMeter"
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"

        app:sv_speedTextColor="@color/colorAccent"
        app:sv_speedBackgroundColor="@android:color/transparent"
        app:sv_textColor="@color/colorWhite"
        app:sv_unitTextColor="@color/colorAccent"
        app:sv_centerCircleColor="@color/colorWhite"
        app:sv_unitTextSize="40dp"
        app:sv_speedTextSize="60dp"
        app:sv_speedTextPadding="0dp"
        app:sv_speedTextPosition="BOTTOM_CENTER"
        app:sv_speedTextFormat="INTEGER"
        app:sv_speedTextTypeface="fonts/DS-DIGII.TTF"
        app:sv_maxSpeed="130"
        app:sv_minSpeed="0"
        app:sv_lowSpeedPercent="30"
        app:sv_mediumSpeedPercent="70"
        app:sv_lowSpeedColor="@color/colorDarkGreen"
        app:sv_mediumSpeedColor="@color/colorDarkYellow"
        app:sv_highSpeedColor="@color/colorRed"
        app:sv_unitSpeedInterval="5dp"
        app:sv_startDegree="150"
        app:sv_endDegree="390"
        app:sv_withTremble="false"
        app:sv_speedometerMode="NORMAL"

        android:layout_below="@+id/Home_tv_Title"
        android:layout_centerHorizontal="true" />

from speedview.

anastr avatar anastr commented on August 23, 2024

this is a little more confusing.
would you try to delete line app:sv_speedometerMode="NORMAL", it is completely useless, (default sv_speedometerMode is NORMAL)
anyway, it doesn't show me any error !! i don't really know why this render show up !

from speedview.

sermyagin avatar sermyagin commented on August 23, 2024

Error help me...

activity_control.xml:14: AAPT: error: attribute sv_highSpeedColor (aka com.github.anastr.speedview:sv_highSpeedColor) not found.

activity_control.xml:14: AAPT: error: attribute sv_lowSpeedColor (aka com.github.anastr.speedview:sv_lowSpeedColor) not found.

activity_control.xml:14: AAPT: error: attribute sv_mediumSpeedColor (aka com.github.anastr.speedview:sv_mediumSpeedColor) not found.
AAPT: error: attribute sv_highSpeedColor (aka com.github.anastr.speedview:sv_highSpeedColor) not found.

activity_ray.xml:14: AAPT: error: attribute sv_lowSpeedColor (aka com.github.anastr.speedview:sv_lowSpeedColor) not found.

ray.xml:14: AAPT: error: attribute sv_mediumSpeedColor (aka com.github.anastr.speedview:sv_mediumSpeedColor) not found.

activity_work_with_indicator.xml:16: AAPT: error: attribute sv_highSpeedColor (aka com.github.anastr.speedview:sv_highSpeedColor) not found.

activity_work_with_indicator.xml:16: AAPT: error: attribute sv_lowSpeedColor (aka com.github.anastr.speedview:sv_lowSpeedColor) not found.

activity_work_with_indicator.xml:16: AAPT: error: attribute sv_lowSpeedPercent (aka com.github.anastr.speedview:sv_lowSpeedPercent) not found.

activity_work_with_indicator.xml:16: AAPT: error: attribute sv_mediumSpeedColor (aka com.github.anastr.speedview:sv_mediumSpeedColor) not found.

activity_work_with_indicator.xml:16: AAPT: error: attribute sv_mediumSpeedPercent (aka com.github.anastr.speedview:sv_mediumSpeedPercent) not found.

activity_work_with_note.xml:15: AAPT: error: attribute sv_highSpeedColor (aka com.github.anastr.speedview:sv_highSpeedColor) not found.

activity_work_with_note.xml:15: AAPT: error: attribute sv_lowSpeedColor (aka com.github.anastr.speedview:sv_lowSpeedColor) not found.

activity_work_with_note.xml:15: AAPT: error: attribute sv_mediumSpeedColor (aka com.github.anastr.speedview:sv_mediumSpeedColor) not found.

from speedview.

anastr avatar anastr commented on August 23, 2024

The answer in #166 @sermyagin

from speedview.

sermyagin avatar sermyagin commented on August 23, 2024

Ответ в # 166 @sermyagin

thanks I will try

from speedview.

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.