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

Sounds like a good idea... #64

Closed
neilyoung opened this issue Jun 6, 2023 · 5 comments
Closed

Sounds like a good idea... #64

neilyoung opened this issue Jun 6, 2023 · 5 comments

Comments

@neilyoung
Copy link

...does not work.

Crashes immediately in Async.init()

2023-06-06 16:57:53.160  3727-3727  AndroidRuntime          com.example.myapp                E  FATAL EXCEPTION: main
                                                                                                    Process: com.example.myapp, PID: 3727
                                                                                                    java.lang.ExceptionInInitializerError

@HaloFour
Copy link

HaloFour commented Jun 6, 2023

I think you need to use compile-time instrumentation in order to get it to work on Android as Davlik lacks the agent instrumentation capabilities of the full JVM?

@neilyoung
Copy link
Author

Whatever this means..

@neilyoung
Copy link
Author

Anyway, don't bother with this. I put it aside.

@HaloFour
Copy link

HaloFour commented Jun 6, 2023

It means that Async.init() can't work because Android doesn't use a proper Java runtime. There are maven and gradle build plugins provided which can perform the transformations at compile-time so that it doesn't depend on a specific runtime, and should be able to run on Android.

@neilyoung
Copy link
Author

Well, I'm using the gradle plugin, but maybe wrong.

implementation 'com.ea.async:ea-async:1.2.3'

then

static {
Async.init();
}

There was no other condition mentioned

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

2 participants