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

Android packaging fails: could not determine kind of name for C.ALooper_pollAll #4806

Open
2 tasks done
TimidFuzz opened this issue Apr 24, 2024 · 3 comments
Open
2 tasks done
Labels
unverified A bug that has been reported but not verified

Comments

@TimidFuzz
Copy link

TimidFuzz commented Apr 24, 2024

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Command: fyne package -os android -appID com.example.test
Output:

go build -buildmode=c-shared -o /tmp/fyne-work-1596608702/lib/armeabi-v7a/libtest.so test failed: exit status 1
# fyne.io/fyne/v2/internal/driver/mobile/app
../../go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/mobile/app/android.go:520:6: could not determine kind of name for C.ALooper_pollAll

How to reproduce

  1. Install android ndk
  2. Copy the code & install fyne
  3. Export the environment variable export ANDROID_NDK_HOME=~/Android/Sdk/ndk/27.0.11718014/
  4. Package for android using fyne package -os android -appID com.example.test

Screenshots

No response

Example code

package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("test")

	content := widget.NewLabel("Hello world!")

	w.SetContent(content)

	w.ShowAndRun()
}

Fyne version

v2.4.5

Go compiler version

1.22.0

Operating system and version

Manjaro linux

Additional Information

This seems to affect only the latest versions of the ndk. Using r20b fixes the issue.

@TimidFuzz TimidFuzz added the unverified A bug that has been reported but not verified label Apr 24, 2024
@Vyacheslav1557
Copy link

I faced the same problem and have not found the solution yet, but it seems that C.ALooper_pollAll was deleted in android api 34 as stated here.

@TimidFuzz
Copy link
Author

TimidFuzz commented May 1, 2024

Using an older version of the ndk solves the problem for me (e.g r20b)

@Joab0
Copy link

Joab0 commented May 2, 2024

I solved it by going to the error (

if C.ALooper_pollAll(-1, nil, nil, nil) == C.ALOOPER_POLL_WAKE {
) and removing the condition
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

3 participants