Open OptimisticPeach opened 5 years ago
Alright! Some more information:
Changing the following items in cargo.toml
do not change the result(These are part of cargo apk):
[package.metadata.android]
# The target Android API level.
# It defaults to 18 because this is the minimum supported by rustc.
# (target_sdk_version and min_sdk_version default to the value of "android_version")
android_version = 29
target_sdk_version = 26
min_sdk_version = 25
# The maximum supported OpenGL ES version , as claimed by the manifest. Defaults to 2.0.
# See https://developer.android.com/guide/topics/graphics/opengl.html#manifest
opengles_version_major = 2
opengles_version_minor = 1
let window: GlutinWindow = WindowSettings::new(
"rust app", (200.0, 200.0)
)
.fullscreen(true)
.graphics_api(OpenGL::V2_1) //This currently matches my Cargo.toml
.build()
.unwrap();
My dependencies are as follows:
[dependencies]
android_glue = {git = "https://github.com/rust-windowing/android-rs-glue"}
piston = "0.49.0"
piston2d-graphics = "0.35.0"
pistoncore-glutin_window = "0.63.0"
piston2d-opengl_graphics = "0.69.0"
[patch.crates-io] # Winit uses an old version which is incompatible with the new cargo apk
android_glue = {git = "https://github.com/rust-windowing/android-rs-glue"}
New questions for when someone answers:
If I run the following code when running on android using
cargo apk
:Logcat shows the following errors:
Full logcat output around this:
``` threaded_app: WindowFocusChanged: 0x76c432bd00 -- 1 Adreno : QUALCOMM build : bc00834, I609ab310b2 Adreno : Build Date : 04/11/19 Adreno : OpenGL ES Shader Compiler Version: EV031.26.07.00 Adreno : Local Branch : Adreno : Remote Branch : Adreno : Remote Branch : Adreno : Reconstruct Branch : Adreno : Build Config : S L 8.0.6 AArch64 ActivityTaskManager: Displayed com.optimistic_peach.trees/android.app.NativeActivity: +107ms Adreno : PFP: 0x005ff110, ME: 0x005ff066 BufferQueueProducer: [com.optimistic_peach.trees/android.app.NativeActivity#0] connect: already connected (cur=1 req=1) libEGL : eglCreateWindowSurface: native_window_api_connect (win=0x762d44c010) failed (0xffffffea) (already connected to another API?) libEGL : eglCreateWindowSurfaceTmpl:729 error 3003 (EGL_BAD_ALLOC) RustAndroidGlueStdouterr: thread 'This happens on similar apps which try to initialize a window using glutin.
Note that this is happening on an android 10 device, where it used to work on android pie. (IE the update broke it 😞 )