Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0 and 2.1 xml class not found #291

Closed
0Flush0 opened this issue Feb 10, 2022 · 11 comments
Closed

Version 2.0 and 2.1 xml class not found #291

0Flush0 opened this issue Feb 10, 2022 · 11 comments

Comments

@0Flush0
Copy link

0Flush0 commented Feb 10, 2022

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
Copy link
Owner

DanielMartinus commented Feb 11, 2022

@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
Copy link
Author

0Flush0 commented Feb 12, 2022

@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
Copy link
Owner

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
Copy link
Author

0Flush0 commented Feb 25, 2022

@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
Copy link
Owner

DanielMartinus commented Feb 25, 2022

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
Copy link
Author

0Flush0 commented Feb 25, 2022

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

lint-results.zip
:

@DanielMartinus
Copy link
Owner

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

@0Flush0
Copy link
Author

0Flush0 commented Feb 27, 2022

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
Copy link
Owner

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?

@0Flush0 0Flush0 closed this as completed Jun 23, 2022
@saldous
Copy link

saldous commented Apr 3, 2023

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
Copy link
Author

0Flush0 commented Apr 5, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants