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

x/mobile: failed to transform file 'hello.aar' to match attributes #25290

Closed
QQMBR opened this issue May 8, 2018 · 6 comments
Closed

x/mobile: failed to transform file 'hello.aar' to match attributes #25290

QQMBR opened this issue May 8, 2018 · 6 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@QQMBR
Copy link

QQMBR commented May 8, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using?

go 1.10.2 on arch linux

What operating system and processor architecture are you using (go env)?

Arch Linux, amd64

What did you do?

I'm trying to use go with Android Studio and have followed the introduction at the go mobile wiki, importing the hello project, setting my GOPATH etc. and than building the project.

What did you expect to see?

A successful build

What did you see instead?

I got the errors

Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform file 'hello.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Failed to transform file 'hello.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Failed to transform file 'hello.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

Unable to resolve dependency for ':app@release/compileClasspath': Failed to transform file 'hello.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Failed to transform file 'hello.aar' to match attributes {artifactType=android-exploded-aar} using transform ExtractAarTransform

The same error presents itself when trying to import an already built .aar
I'd be very thankful if anyone can point me in the right direction!

@gopherbot gopherbot added this to the Unreleased milestone May 8, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label May 8, 2018
@bradfitz
Copy link
Contributor

bradfitz commented May 8, 2018

/cc @eliasnaur

@eliasnaur
Copy link
Contributor

Please provide the detailed steps to reproduce the problem. What version of Android Studio? Which commands are you running? And so on.

@QQMBR
Copy link
Author

QQMBR commented May 8, 2018

Using Android Studio 3.1.2 (latest).
Ran
go get -d golang.org/x/mobile/example/bind/...
To get the example hello project, from then on importing it into Android Studio and editing the GOPATH and GO paths in the hello/build.gradle, as per the gomobile wiki.

After that, simply syncing gradle returns this error.

@ALTree ALTree changed the title x/mobile: x/mobile: failed to transform file 'hello.aar' to match attributes May 8, 2018
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 8, 2018
@eliasnaur
Copy link
Contributor

It seems this is a dup of #23307.

@gopherbot
Copy link

Change https://golang.org/cl/112455 mentions this issue: misc/androidstudio: drop the clean task to fix Android Studio gradle sync

@eliasnaur
Copy link
Contributor

eliasnaur commented May 9, 2018

The CL should fix the issue. Note that only gradle sync fails; running a gomobile project from Android Studio does work.

gopherbot pushed a commit to golang/mobile that referenced this issue May 9, 2018
…sync

Suggestion from

golang/go#23307 (comment)

I've manually verified in Android Studio that removing the clean task
does fix the issue reported in golang/go#25290.

Fixes golang/go#25290.
Fixes golang/go#23307.

Change-Id: Ic1a8c240fc8e4c4aaf59977fd559dd221ff605b1
Reviewed-on: https://go-review.googlesource.com/112455
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@golang golang locked and limited conversation to collaborators May 9, 2019
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
…sync

Suggestion from

golang/go#23307 (comment)

I've manually verified in Android Studio that removing the clean task
does fix the issue reported in golang/go#25290.

Fixes golang/go#25290.
Fixes golang/go#23307.

Change-Id: Ic1a8c240fc8e4c4aaf59977fd559dd221ff605b1
Reviewed-on: https://go-review.googlesource.com/112455
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
…sync

Suggestion from

golang/go#23307 (comment)

I've manually verified in Android Studio that removing the clean task
does fix the issue reported in golang/go#25290.

Fixes golang/go#25290.
Fixes golang/go#23307.

Change-Id: Ic1a8c240fc8e4c4aaf59977fd559dd221ff605b1
Reviewed-on: https://go-review.googlesource.com/112455
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants