Open alexborton opened 6 years ago
Hey @alexborton, thanks for reaching out.
Could you confirm the version number of arcore in the diectory "../node_modules/react-viro/android/arcore_client"? Ideally this should be core-1.3.0.aar. If they do match, then the classes that Android Studio is complaining about should be there and match.
After which, try cleaning and re-syncing your project.
If it still fails, then one possibility is that Android studio is running into dex issues resulting in incomplete compiled classes. Thus, those classes are incomplete and do not match, resulting in a build failure. Due to the I'm wondering if it's still because the heap size is still not large enough. If so could you try:
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
Looks like @variux encountered this issue as well here.
Hi @dthian as I told in the last post the solution was to deactivate instant run, cause I didn't read carefully the instructions
@dthian Thanks for your feedback.
arcore_client
is core-1.4.0.aar
I'm sorry but i don't know what you mean by this part;
If they do match, then the classes that Android Studio is complaining about should be there and match
@variux is there a way of disabling instant run through the gradle/files rather than android studio as i am not using android studio.
I did manage to get builds running using Jack; i had to add the following to my build.gradle
defaultConfig {
...
jackOptions {
enabled true
}
...
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
This does work but is very slow and it seems that Jack is deprecated.... If there is a better way then i would like to know it.
@alexborton is there a reason you are not using Android Studio? We are not familiar with Jack and if it is deprecated not sure how much we can assist.
Hey @alexborton, that's interesting - it looks like you are using some java code that uses Java 8 APIs, potentially causing the build failure? Was the sourceCompatibility 1.8 options listed before when the build was failing? Also, does it work without Jack as Google mentions here?
@alexborton I was hitting the same issue in a project that previously had react-viro
working. I downgraded to react-viro@2.6.1
and Android builds now work. Version 2.7
seems to introduce the issue.
Hi @JChanceHud, @alexborton, Perhaps another thing to try is to upgrade your gradle plugin to 3.0.1.
So in your android/build.gradle change:
classpath 'com.android.tools.build:gradle:2.2.3'
to:
classpath 'com.android.tools.build:gradle:3.0.1'
As I understand gradle 3.0 supports Java 8, so if you use it, you shouldn't need Jack.
This issue still exist in 2.11.0 on Android. Downgrading to 2.6.1 fixes it.. downside you get ARCore 1.1.0 and autofocus doesn't work for Android. @dthian @variux This is with instant run off & dexOptions { javaMaxHeapSize "4g" preDexLibraries = false } also tried jumboMode but no dice.
Hi @KirkBallou, What gradle version are you using?
@VikAdvani In reference to the question you asked @KirkBallou, we are currently on gradle version 3.0.1.
Description
I am trying to integrate Viro with my existing app for Android having already completed the integration with iOS (with a working example).
I have followed these instructions where applicable, but now get the following error when trying to compile Android debug;
The same error occurs during a release build.
My Gradle looks like this (android/app/build.gradle);
Plus this build gradle (andoird/build.gradle);