DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.13k stars 299 forks source link

Version 2.0 and 2.1 xml class not found #291

Closed 0Flush0 closed 2 years ago

0Flush0 commented 2 years ago

i have added the implementation to my build.gradle, but in xml the KonfettiView is not found: These are my dependencies: dependencies {

implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'nl.dionsegijn:konfetti-xml:2.0.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

}

DanielMartinus commented 2 years ago

@0Flush0 hey flush, the import looks good. What View did you try to import? Did you use the correct path that includes xml like this?

<nl.dionsegijn.konfetti.xml.KonfettiView
    android:id="@+id/konfettiView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
0Flush0 commented 2 years ago

@DanielMartinus Thank you for your quick reply, im am using the correct path i think. Do i have to import the library in xml? This is the error: Class referenced in the layout file, "nl.dionsegijn.konfetti.xml.KonfettiVew", was not found in the project or the libraries. Cannot resolve class nl.dionsegijn.konfetti.xml.KonfettiVIew

Screenshot 2022-02-12 130644

(Sry for bad english)

DanielMartinus commented 2 years ago

Strange, would you be able to provide a sample project? I have no issues here. Tried old and new projects and all are able to import the KonfettiView

0Flush0 commented 2 years ago

@DanielMartinus Thanks again for the reply, i have created a test repository if you want to look into my issue. Maybe its just me being incompetent and i hope i dont have wasted your time . https://github.com/0Flush0/test Sry for bad engish again :)

DanielMartinus commented 2 years ago

No worries.

I opened the project and don't encounter any issues. Looking at the list of external libraries everything seems to be fine.

CleanShot 2022-02-25 at 18 14 23@2x

Do you see any gradle build errors in Android Studio maybe?

0Flush0 commented 2 years ago

When running a clean build i get some issues, the report might help, but i am not seeing threw this:

lint-results.zip :

DanielMartinus commented 2 years ago

Lint won't show any issues related to this. Does your gradle console output any issue?

0Flush0 commented 2 years ago

I have found a promising issue, that could relate to this problem. There is a note, that some input files use or override a deprecated API:

Task :app:mergeReleaseAssets Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.

DanielMartinus commented 2 years ago

I don't think that is the issue. If you run ./gradlew build in the terminal of the folder of your project can you share the error that's shown?

saldous commented 1 year ago

I'm getting this same issue. I import the library successfully in build.gradle, but when I try and add this to the xml it can't find it.

<nl.dionsegijn.konfetti.xml.KonfettiView
    android:id="@+id/konfettiView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
image

Were you able to solve the issue? (I'm using an M1 Macbook if that has anything to do with it?)

0Flush0 commented 1 year ago

I am sorry, but i could'nt solve the issue at the time and it was just not worth the hassle for me, to continue searching for a solution. Hope you find one :)