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 build example failing with "Type rust.miniquad.example.quad.MainActivity$1 is defined multiple times" #442

Open
jmetz opened this issue Jun 1, 2024 · 0 comments

Comments

@jmetz
Copy link

jmetz commented Jun 1, 2024

The example in the readme fails:

docker run --rm -v $(pwd)":/root/src" -w /root/src notfl3/cargo-apk cargo quad-apk build --example quad   
   ...
5 warnings                                                                                                                                                                                      
Error in /root/src/target/android-artifacts/debug/examples/quad/build/obj/rust/miniquad/example/quad/MainActivity$1.class:                                                                      
Type rust.miniquad.example.quad.MainActivity$1 is defined multiple times: /root/src/target/android-artifacts/debug/examples/quad/build/obj/rust/miniquad/example/quad/MainActivity$1.class, /roo
t/src/target/android-artifacts/debug/examples/quad/build/obj/rust/miniquad/example/quad/MainActivity_1.class                                                                                    
Compilation failed                            
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /root/src/target/android-artifacts/debug/example
s/quad/build/obj/rust/miniquad/example/quad/MainActivity$1.class                                                                                                                                
        at com.android.tools.r8.utils.w.a(SourceFile:92)
        at com.android.tools.r8.D8.main(D8.java:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /root/src/target/android-artifacts/debug/examples/quad/build/obj/rust/miniquad/example/quad/
MainActivity$1.class
        at Version.fakeStackEntry(Version_3.0.41-dev.java:0)
        at com.android.tools.r8.utils.w.a(SourceFile:68)
        at com.android.tools.r8.utils.w.a(SourceFile:28)
        at com.android.tools.r8.utils.w.a(SourceFile:27)
        at com.android.tools.r8.utils.w.b(SourceFile:3)
        at com.android.tools.r8.D8.a(D8.java:17) 
        at com.android.tools.r8.D8.a(D8.java:15) 
        at com.android.tools.r8.utils.w.a(SourceFile:84)
        ... 1 more

Version: Current (31ac0af)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant