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

cmd/ebitenmobile: doesn't work with Android SDK 34 #2992

Closed
2 of 11 tasks
kendellfab opened this issue May 16, 2024 · 4 comments
Closed
2 of 11 tasks

cmd/ebitenmobile: doesn't work with Android SDK 34 #2992

kendellfab opened this issue May 16, 2024 · 4 comments

Comments

@kendellfab
Copy link

kendellfab commented May 16, 2024

Ebitengine Version

2.7.3

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

1.22.3

What steps will reproduce the problem?

Building a bind for android using ebitenmobile.

ebitenmobile bind -target android -javapkg io.highcreeksoftware.submarinegame -o submarinegame.aar ./cmd/mobile/

What is the expected result?

The .aar file should be built.

What happens instead?

An error occurs.

`gomobile: go build -buildmode=c-shared -o=/tmp/gomobile-work-2964117455/android/src/main/jniLibs/x86/libgojni.so ./gobind failed: exit status 1
# github.com/ebitengine/oto/v3/internal/oboe
oboe_aaudio_AudioStreamAAudio_android.cpp:531:66: warning: format specifies type 'int' but the argument has type 'DataCallbackResult' [-Wformat]
./oboe_common_OboeDebug_android.h:30:71: note: expanded from macro 'LOGE'
# github.com/ebitengine/oto/v3/internal/oboe
oboe_common_AudioStreamBuilder_android.cpp:99:50: warning: format specifies type 'int' but the argument has type 'Result' [-Wformat]
./oboe_common_OboeDebug_android.h:29:70: note: expanded from macro 'LOGW'
# github.com/ebitengine/oto/v3/internal/oboe
oboe_common_DataConversionFlowGraph_android.cpp:99:13: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:28:70: note: expanded from macro 'LOGI'
oboe_common_DataConversionFlowGraph_android.cpp:99:27: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:28:70: note: expanded from macro 'LOGI'
oboe_common_DataConversionFlowGraph_android.cpp:102:13: warning: format specifies type 'int' but the argument has type 'SampleRateConversionQuality' [-Wformat]
./oboe_common_OboeDebug_android.h:28:70: note: expanded from macro 'LOGI'
oboe_common_DataConversionFlowGraph_android.cpp:131:78: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:30:71: note: expanded from macro 'LOGE'
oboe_common_DataConversionFlowGraph_android.cpp:153:71: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:30:71: note: expanded from macro 'LOGE'
oboe_common_DataConversionFlowGraph_android.cpp:229:65: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:30:71: note: expanded from macro 'LOGE'
# github.com/ebitengine/oto/v3/internal/oboe
oboe_opensles_AudioOutputStreamOpenSLES_android.cpp:375:70: warning: format specifies type 'int' but the argument has type 'Result' [-Wformat]
./oboe_common_OboeDebug_android.h:29:70: note: expanded from macro 'LOGW'
# github.com/ebitengine/oto/v3/internal/oboe
oboe_opensles_AudioStreamOpenSLES_android.cpp:76:24: warning: format specifies type 'int' but the argument has type 'AudioFormat' [-Wformat]
./oboe_common_OboeDebug_android.h:29:70: note: expanded from macro 'LOGW'
oboe_opensles_AudioStreamOpenSLES_android.cpp:425:62: warning: format specifies type 'int' but the argument has type 'DataCallbackResult' [-Wformat]
./oboe_common_OboeDebug_android.h:29:70: note: expanded from macro 'LOGW'
# github.com/ebitengine/gomobile/app
$HOME/go/pkg/mod/github.com/ebitengine/gomobile@v0.0.0-20240429094902-cf88669c3591/app/android.go:368:6: could not determine kind of name for C.ALooper_pollAll`

Anything else you feel useful to add?

No response

@hajimehoshi
Copy link
Owner

Thank you for reporting!

Maybe fyne-io/fyne#4806? Which SDK version are you using?

Probably there is the same issue in Gomobile itself.

@hajimehoshi hajimehoshi changed the title Cannot build game with ebitenmobile bind cmd/ebitenmobile: cannot build game with ebitenmobile bind May 17, 2024
@hajimehoshi hajimehoshi added this to the v2.7.4 milestone May 17, 2024
@kendellfab
Copy link
Author

I have the Android SDK version 34 installed. With the latest version of the NDK. I think you're right in with the error being consistent with what the fyne project is seeing.

@hajimehoshi
Copy link
Owner

I've succeeded to reproduce the issue.

hajimehoshi added a commit to ebitengine/gomobile that referenced this issue May 18, 2024
ALooper_pollAll is no longer available as of Android SDK 34.

Updates hajimehoshi/ebiten#2992
Updates golang/go#67496
hajimehoshi added a commit that referenced this issue May 18, 2024
This fixes the issue with Android SDK 34.

Closes #2992
@hajimehoshi
Copy link
Owner

Try 1701725.

# In your game repository
go get github.com/hajimehoshi/ebiten/v2@17017259cecdec6f61eab500b2f9c3c8e4e0a168
go install github.com/hajimehoshi/ebiten/v2/cmd/ebitenmobile@17017259cecdec6f61eab500b2f9c3c8e4e0a168

I'll release v2.7.4 a few days later.

Thank you for reporting!

@hajimehoshi hajimehoshi changed the title cmd/ebitenmobile: cannot build game with ebitenmobile bind cmd/ebitenmobile: doesn't work with Android SDK 34 May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants