Velocimeter - dials and meters

abarnett

Member
Licensed User
Longtime User
Unfortunately I am still getting this error trying to run the example. It compiles but code fails when trying to loadlayout. Any ideas would be appreciated
 

Johan Schoeman

Expert
Licensed User
Longtime User
Unfortunately I am still getting this error trying to run the example. It compiles but code fails when trying to loadlayout. Any ideas would be appreciated
I have downloaded it some time ago and have just tested it on my device. It works 100%.

Velocimeter.png
 

abarnett

Member
Licensed User
Longtime User
I have downloaded it some time ago and have just tested it on my device. It works 100%.

View attachment 37814
Are you running all the latest SDK and B4a. All i'm trying to do at this stage is run the libvelocimeter example exactly as extracted.

I have updated android sdk to latest versions and recompiled my other apps which all work fine until I include this library.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Are you running all the latest SDK and B4a. All i'm trying to do at this stage is run the libvelocimeter example exactly as extracted.

I have updated android sdk to latest versions and recompiled my other apps which all work fine until I include this library.
Running the latest version of B4A with:

VelocimeterSetup.png
 

DonManfred

Expert
Licensed User
Longtime User
Still no luck
please zip the complete project-folder and send it to me. dont use the export as zip. Just zip all together...
Upload the file somewhere and give me the link to the download.

Please note here in forum the fuleuploadsize is limited to 500kb
 

alienhunter

Active Member
Licensed User
Longtime User
Testing the example app, and would love to donate but I'm getting a java error:

Installing file.
PackageAdded: package:b4a.example
** Activity (main) Create, isFirst = true **
Error occurred on line: 33 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166)

Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:54)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:158)
... 21 more
Caused by: java.lang.RuntimeException: native typeface cannot be made
at android.graphics.Typeface.<init>(Typeface.java:175)
at android.graphics.Typeface.createFromAsset(Typeface.java:149)
at com.github.glomadrian.velocimeterlibrary.painter.digital.DigitalImp.initTypeFace(DigitalImp.java:59)
at com.github.glomadrian.velocimeterlibrary.painter.digital.DigitalImp.<init>(DigitalImp.java:34)
at com.github.glomadrian.velocimeterlibrary.VelocimeterView.init(VelocimeterView.java:132)
at com.github.glomadrian.velocimeterlibrary.VelocimeterView.<init>(VelocimeterView.java:78)
at de.donmanfred.VelocimeterViewWrapper._initialize(VelocimeterViewWrapper.java:44)
... 25 more
** Activity (main) Resume **

Hi ,
here i got the same problem /error , only the demo works
but when i copy the code out of the demo in my demo (no changes ) 1:1 it does not work any more !
 

alienhunter

Active Member
Licensed User
Longtime User
There are files in the original project's /Objects/res folder that the library makes use of. Have you copied them to your new project? If not, your project will not work.
hi
done that , was some post's above or so
strange thing, I had to use the layout file from the demo then it worked !!
for some reason the customview velo1 is different in 5.5. or something else is happening , by just copy form demo and paste the velo1 view in another layout i get the error, or create a new view
All settings for the view are identical in the new project vs. demo !
hmmmm
 

Johan Schoeman

Expert
Licensed User
Longtime User
hi
done that , was some post's above or so
strange thing, I had to use the layout file from the demo then it worked !!
for some reason the customview velo1 is different in 5.5. or something else is happening , by just copy form demo and paste the velo1 view in another layout i get the error, or create a new view
All settings for the view are identical in the new project vs. demo !
hmmmm
If you take a look in the original project that @DonManfred has posted (go to designer) you will see that there is a customview that was added in the layout of which the customtype has been set to VelocimeterView. Unless you either add a customview to your own project and set the customtype to VelocimeterView (which will only be available for selection once you have enabled the library in the library tab of the IDE) or add a view programmatically the project won't work. By copying the layout file you have now basically added the customview (of which the customtype is set correctly) to your project. I guess that is maybe what the problem was...
 

alienhunter

Active Member
Licensed User
Longtime User
If you take a look in the original project that @DonManfred has posted (go to designer) you will see that there is a customview that was added in the layout of which the customtype has been set to VelocimeterView. Unless you either add a customview to your own project and set the customtype to VelocimeterView (which will only be available for selection once you have enabled the library in the library tab of the IDE) or add a view programmatically the project won't work. By copying the layout file you have now basically added the customview (of which the customtype is set correctly) to your project. I guess that is maybe what the problem was...
thank you ,
I did all that but it still fails for some reason , anyway I choose other dial , must be something that i am doing wrong :oops:
 

sultan87

Active Member
Licensed User
Longtime User
hello,
I downloaded VelocimeterEx.zip and libVelocimeterV1.0.1
when I run the debug mode by applying it stops on the line
Activity.LoadLayout ("Layout1")

I am very interested in this library
but it takes me to the test

can you give me the latest versions

best regards
 

sultan87

Active Member
Licensed User
Longtime User
hello,
thank's for your response
the error is on the line Activity.LoadLayout("Layout1")
I attach the log
Best regards
 

Attachments

  • log.txt
    2.7 KB · Views: 185
Top