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

is viro migrated to AndroidX #340

Open
phathv opened this issue Sep 5, 2020 · 16 comments
Open

is viro migrated to AndroidX #340

phathv opened this issue Sep 5, 2020 · 16 comments

Comments

@phathv
Copy link

phathv commented Sep 5, 2020

Hi,
My project is migrated to Androidx, after that I cannot run the app, it fires error related to Viro lib
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class com.viro.core.ViroView, unresolved supertypes: android.app.Application.ActivityLifecycleCallbacks
i am using virocore-release-v_1_17_0.aar sdk-common-1.180.0.aar core-1.10.0.aar
please help. Do you support AndroidX project?

@iTruff
Copy link

iTruff commented Sep 7, 2020

Hi @phathv try to add these lines in your gradle.properties file and rebuild your project.

android.enableJetifier=true
android.useAndroidX=true

@phathv
Copy link
Author

phathv commented Sep 8, 2020

Hi @phathv try to add these lines in your gradle.properties file and rebuild your project.

android.enableJetifier=true
android.useAndroidX=true

Thanks @iTruff, I already added them in the file, but it still fires the error. I guess the Virocore has not supported for AndroidX projects. Anyone has experience on this, please help! thanks

@iTruff
Copy link

iTruff commented Sep 8, 2020

Hi @phathv, you are right ViroCore uses old dependency:

implementation 'com.android.support:appcompat-v7:28.0.0'

but that's why we should include:

android.enableJetifier=true
android.useAndroidX=true

to make it work. From Jetifier docs:

A standalone tool that migrates a library's dependencies on the deprecated support library to equivalent AndroidX dependencies.

Also I'm developing AndroidX project with ViroCore right now and everything works fine. I'm using:

ARCore version - core-1.10.0.aar
ViroCore version - virocore-release-v_1_17_0.aar

You can grab these dependencies from sample project, also you can try to migrate sample project to AndroidX and it should work too. Don't forget to include:

androidx.appcompat:appcompat:1.2.0

as a replacement for old support appcompat dependency in ViroCore SDK.

@phathv
Copy link
Author

phathv commented Sep 9, 2020

Hi @iTruff thanks for your guide.
I already did the exact thing you said. Does your project contain kotlin code? Yes, the sample works with java code. My real project contains both java and kotlin, maybe that (kotlin compiler...) fires the problem :(

@iTruff
Copy link

iTruff commented Sep 9, 2020

Hi @phathv I'm also using Kotlin in my project. Maybe you will be able to share your project then I will try to reproduce your issue and help.

@phathv
Copy link
Author

phathv commented Sep 9, 2020

thanks @iTruff Really appreciate
unfortunately, my project is confidential, i cannot public it. Can you send me the sample project that contains both java and kotlin files (that including kotlin compiler, gradle version...) please? I will compare the config to learn an important thing from that. my email [email protected]
Thanks a lot!

@iTruff
Copy link

iTruff commented Sep 10, 2020

Hi @phathv You can try this project, it's just sample migrated to Kotlin. Just update ARCore and ViroCore dependencies and try to build it. If you will have problems even there I'll build small test project with ViroCore and Kotlin and send you via email.

@phathv
Copy link
Author

phathv commented Sep 10, 2020

Thanks so much @iTruff i tried it, this is NOT an AndroidX project with virocore & kotlin, so it works as usual. My problem is on virocore project with kotlin after migrated to AndroidX.

@phathv
Copy link
Author

phathv commented Sep 14, 2020

Hi @iTruff can you please send me a test AndroidX project with virocore and kotlin? Thanks in advance

@iTruff
Copy link

iTruff commented Sep 25, 2020

Hi @phathv I was very busy last few weeks. Do you still need my help?

@phathv
Copy link
Author

phathv commented Sep 25, 2020

Hi @iTruff yes, I need your help, please!

@iTruff
Copy link

iTruff commented Sep 30, 2020

Hi @phathv I've sent project to [email protected]

@phathv
Copy link
Author

phathv commented Sep 30, 2020

thanks very much @iTruff i will check it soon.

@inveders
Copy link

inveders commented Apr 20, 2021

Hi @iTruff I'm also interested in this sample project, could you send me please at [email protected]?

@iTruff
Copy link

iTruff commented Apr 20, 2021

@inveders Done.

@hannesa2
Copy link

What's about to have an active maintainer here, then we could convert this repo to Android-X

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

4 participants