Closed ndungudedan closed 1 year ago
Hello @ndungudedan . What commands did you enter to build?
@jefft0 I haven't entered any commands. I also can`t find documentation referencing that.
Are you trying to build the Android or iOS version? What steps did you do? (If Android, did you open Android Studio? Which folder?)
If you are building in Android Studio, first you must build the Go core. In a terminal, enter:
cd packages
make build_core.android
Please see the questions above. If we don't hear from you, this issue will be closed as inactive in 14 days.
I had the same problem with it not finding the ipfs.gomobile:core:0.0.42-dev so I ran the command listed above but when I run make build_core.android
in the packages directory I get this error
------------------------------------
Go: installing modules
------------------------------------
go mod download
make: go: No such file or directory
make: *** [Makefile:362: run] Error 127
@kf7mxe , you need to install Go 1.17 from https://go.dev/dl . Then set environment variables:
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
Facing the same issue, tried the step suggested, but now seeing another error:
Makefile:32: *** "Can't get
If you are building in Android Studio, first you must build the Go core. In a terminal, enter:
cd packages make build_core.android
Hello @JavaMousekin . I created detailed install instructions. We are still improving them and will merge into gomobile-ipfs master soon. Can you please look at the instructions? Is your platform listed? https://github.com/jefft0/gomobile-ipfs/blob/add-INSTALL/INSTALL.md
Hi @jefft0 appreciate your effort, that is really helpful guide, but now I'm facing the next error: Error: [Errno 2] No such file or directory: '.../gomobile-ipfs/packages/build/android/intermediates/core/core-sources.jar' Seems the lib was not compiled properly, did I miss something? I'm on Windows 11, but running everything using Ubuntu terminal.
Are you using Windows Subsystem for Linux? What is the Ubuntu version?
Yes, it's Ubuntu 20.04.5 LTS
I tried on WSL. A requirement is to install and run Android Studio. When I try to launch it, I get the error "Unable to detect graphics environment". Are you able to launch Android Studio?
Well, I installed Android Studio to the Windows machine itself and pass /mnt/...-like paths to the env variables.
I don't think that will work. Need the Linux executables for NDK, etc.
Either figure out how to run Android Studio from WSL (I haven't researched this online) or run Ubuntu in a virtual machine like Virtual Box.
I faced some errors related to the NDK during struggling with this build process before, but after setting ANDROID_NDK_HOME to /mnt/.. directory they have vanished. Any way, I'll try with VB, and post my updates here. Thank u!
Thanks. Let us know.
Hello @jefft0 I did what you suggested, using Ubuntu 22.04 mashine, but now facing another issue, it looks like some Go version missmatch, please advise what should I update or downgrade?
Did you set the environment variables for Ubuntu as shown here? https://github.com/jefft0/gomobile-ipfs/blob/add-INSTALL/INSTALL.md#user-content-build-for-android
Especially important is JAVA_HOME. Do you have a jre at /usr/local/android-studio/jre ?
@jefft0 your guess was right, I didn't set them properly at first, that was an issue.
Please note, usr/local/android-studio/jre contains version 11 by default and it causes another issue:
option --boot-class-path not allowed with target 11
So I had to install JDK version 1.8, and set it to the JAVA_HOME.
Finally it works now, thanks a lot for your help!
@JavaMousekin , you're welcome. Glad to hear you got it working. I haven't seen a message from the original poster in weeks, so I will close this issue. If there is another problem, feel free to open another issue.
Asking a question, not reporting a bug
Is there an existing issue for this?
Question
Trying to build the android example but I get the following error Could not find ipfs.gomobile:core:0.0.42-dev.
Context
Cannot build android example app