is viro migrated to AndroidX
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?
Hi @phathv try to add these lines in your gradle.properties file and rebuild your project.
android.enableJetifier=true
android.useAndroidX=true
Hi @phathv try to add these lines in your
gradle.propertiesfile 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
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.
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 :(
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.
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!
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.
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.
Hi @iTruff can you please send me a test AndroidX project with virocore and kotlin? Thanks in advance
Hi @phathv I was very busy last few weeks. Do you still need my help?
Hi @iTruff yes, I need your help, please!
Hi @phathv I've sent project to [email protected]
thanks very much @iTruff i will check it soon.
Hi @iTruff I'm also interested in this sample project, could you send me please at [email protected]?
@inveders Done.
What's about to have an active maintainer here, then we could convert this repo to Android-X