x/mobile: bind/java/seq_test.go cannot find aar on latest android studio #10668
Comments
Same problem here. |
@crawshaw : I could reproduce the problem myself. The class files are in the apk (so, Go.init was called) and could be found from the app package but not from bind/java package. It seems that when find_class is called from the Go thread, a wrong class loader was picked up. Verified with logging the exception details. http://developer.android.com/training/articles/perf-jni.html#faq_FindClass I will try to cache the loader or class from JNI_OnLoad as recommended in the doc. @timcooijmans Is the problem related to the bind/java/seq_test.go? In seq_test.go setup, go.Seq is in build/intermediates/exploded-aar/testpkg/classes.jar. |
@hyangah I'm seeing exactly the same problem in other projects. However both in seq_test.go and in my project I was surprised to see that the go-related Java-class-files were not present during gradle-building in the intermediate/classes directory. I expected them there but maybe I am wrong on that. |
When running go test, adb logcat reports:
It looks like go.Seq is in the testpkg.aar, but gradle is not making it part of the apk.
The text was updated successfully, but these errors were encountered: