virocore icon indicating copy to clipboard operation
virocore copied to clipboard

is viro migrated to AndroidX

Open phathv opened this issue 5 years ago • 16 comments

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?

phathv avatar Sep 05 '20 06:09 phathv

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

android.enableJetifier=true
android.useAndroidX=true

iTruff avatar Sep 07 '20 11:09 iTruff

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

phathv avatar Sep 08 '20 03:09 phathv

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.

iTruff avatar Sep 08 '20 08:09 iTruff

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

phathv avatar Sep 09 '20 02:09 phathv

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.

iTruff avatar Sep 09 '20 08:09 iTruff

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!

phathv avatar Sep 09 '20 13:09 phathv

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.

iTruff avatar Sep 10 '20 08:09 iTruff

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 avatar Sep 10 '20 09:09 phathv

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

phathv avatar Sep 14 '20 14:09 phathv

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

iTruff avatar Sep 25 '20 07:09 iTruff

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

phathv avatar Sep 25 '20 10:09 phathv

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

iTruff avatar Sep 30 '20 10:09 iTruff

thanks very much @iTruff i will check it soon.

phathv avatar Sep 30 '20 10:09 phathv

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

inveders avatar Apr 20 '21 13:04 inveders

@inveders Done.

iTruff avatar Apr 20 '21 13:04 iTruff

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

hannesa2 avatar Apr 20 '21 13:04 hannesa2