Closed Reza-Rg closed 10 years ago
Hey, guy. Are you using Gradle? I tested just now, it works well.
Hi, Yes. I am using Gradle. I also had this problem with v.1.1 and I thought may be v.1.2 fixed it, but same error. I also have some other libraries which are working fine, and I have problem only with this one. :|
It's weird, can you sync successfully?
Yes, Android Studio Syncs successfully with no problem. I tried it on two different projects, both ended "force close" by same error.
Could you paste your code and layout xml here? I guess it's not the library error..
Here it is:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.ghaleh.minifc.activities.Drawer1">
...
<com.daimajia.numberprogressbar.NumberProgressBar
android:id="@+id/powerbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
style="@style/NumberProgressBar_Default"
app:max = "100"
app:progress = "80"/>
...
</LinearLayout>
and I have nothing related to "powerbar" id in my code. for more info "Drawer1" extends Fragment and that is all.
Hey,
did you download the jar
version and put it into the libs
folder?
I have an idea. You can make a test project.
I tried:
compile 'com.daimajia.numberprogressbar:library:1.2@aar'
and after facing error I downloaded libs folder added in my "libraries" folder and add this line to setting.gradle:
include ':libraries:android_ago'
include ':libraries:paper_style'
include ':libraries:number_progressbar'
and finally added this line to build.gradle:
...
compile project(':libraries:number_progressbar')
but I got same error.
I want to remotely help you to solve this problem, shall we?
using TeamViewer share your desk.
Thank you! Thats nice of you. Just let me download TeamViewer.
Share we start?
OK, Thanks again ID: 235 918 013 Pass: 7191
Password invalid...
You can try to run the first empty project in simulator... check if it works
Hey, a new quick way:
change
this(context, attrs, R.attr.numberProgressBarStyle);
to
this(context, attrs, null);
please have a try.
Sorry that I removed the project from lib folder. You may need git it again and modify it.
Not a problem. I'll check it now. and let you know.
Mistake.
should be 0
instead of null
.
this(context, attrs, 0);
You are a genius! :) Actually I used
this(context, attrs, 0);
and it worked :)
oh, great!
Ok, i'll do some other changes, before publish new version.
enjoy it.
That was great. I really appreciate you for helping me. Thats kind of you. Thanks again.
android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.daimajia.numberprogressbar.NumberProgressBar
I've tried adding library to my project. I am facing some problem, I clicked 'Syns now', and I also downloaded library locally and added it to project, and ... I've tried every thing but I still got this error, any advice ?