gomobile-ipfs icon indicating copy to clipboard operation
gomobile-ipfs copied to clipboard

Could not find ipfs.gomobile:core:0.0.42-dev.

Open ndungudedan opened this issue 3 years ago • 4 comments

Asking a question, not reporting a bug

  • [X] This question is not about a bug

Is there an existing issue for this?

  • [X] I have searched the existing issues

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

ndungudedan avatar Jul 26 '22 08:07 ndungudedan

Hello @ndungudedan . What commands did you enter to build?

jefft0 avatar Jul 27 '22 08:07 jefft0

@jefft0 I haven't entered any commands. I also can`t find documentation referencing that.

ndungudedan avatar Jul 27 '22 08:07 ndungudedan

Are you trying to build the Android or iOS version? What steps did you do? (If Android, did you open Android Studio? Which folder?)

jefft0 avatar Aug 02 '22 10:08 jefft0

If you are building in Android Studio, first you must build the Go core. In a terminal, enter:

cd packages
make build_core.android

jefft0 avatar Aug 02 '22 10:08 jefft0

Please see the questions above. If we don't hear from you, this issue will be closed as inactive in 14 days.

jefft0 avatar Aug 23 '22 08:08 jefft0

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 avatar Aug 24 '22 04:08 kf7mxe

@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"

jefft0 avatar Aug 24 '22 06:08 jefft0

Facing the same issue, tried the step suggested, but now seeing another error: Makefile:32: *** "Can't get <global.group_id> from Manifest.yml".

If you are building in Android Studio, first you must build the Go core. In a terminal, enter:

cd packages
make build_core.android

m-stadnyk avatar Aug 30 '22 08:08 m-stadnyk

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

jefft0 avatar Sep 02 '22 16:09 jefft0

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.

m-stadnyk avatar Sep 07 '22 15:09 m-stadnyk

Are you using Windows Subsystem for Linux? What is the Ubuntu version?

jefft0 avatar Sep 07 '22 15:09 jefft0

Yes, it's Ubuntu 20.04.5 LTS

m-stadnyk avatar Sep 07 '22 15:09 m-stadnyk

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?

jefft0 avatar Sep 07 '22 15:09 jefft0

Well, I installed Android Studio to the Windows machine itself and pass /mnt/...-like paths to the env variables.

m-stadnyk avatar Sep 07 '22 15:09 m-stadnyk

I don't think that will work. Need the Linux executables for NDK, etc.

jefft0 avatar Sep 07 '22 15:09 jefft0

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.

jefft0 avatar Sep 07 '22 15:09 jefft0

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!

m-stadnyk avatar Sep 07 '22 15:09 m-stadnyk

Thanks. Let us know.

jefft0 avatar Sep 07 '22 15:09 jefft0

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? image

m-stadnyk avatar Sep 08 '22 09:09 m-stadnyk

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 avatar Sep 08 '22 09:09 jefft0

@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!

m-stadnyk avatar Sep 08 '22 11:09 m-stadnyk

@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.

jefft0 avatar Sep 08 '22 15:09 jefft0