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

build failed in android #48

Closed
poria-cat opened this issue Sep 18, 2019 · 2 comments
Closed

build failed in android #48

poria-cat opened this issue Sep 18, 2019 · 2 comments

Comments

@poria-cat
Copy link

unity version is 2019..3.0b1

I have export for android, then make unity-classes.jar as library.
and copy unity-classes folder from example, delete unity-classes/unity-classes.jar like tutorial video, then move UnityExport/libs/unity-classes.jar to unity-classes folder

when I run flutter build apk it will tell me can't find UnityExport.

so, I add

include ":UnityExport"
project(":UnityExport").projectDir = file("./UnityExport")

to ./android/setting.gradle, and it tell me that can't found unity-class

so i add

include ':app', ':unity-classes'

in it, then run build command, it tell me that:

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:lintVitalRelease'.                      
> Could not resolve all artifacts for configuration ':flutter_unity_widget:profileRuntimeClasspath'.
   > Could not resolve project :UnityExport.                            
     Required by:                                                       
         project :flutter_unity_widget                                  
      > Unable to find a matching variant of project :UnityExport:      
          - Variant 'debugApiElements':                                 
              - Required com.android.build.api.attributes.BuildTypeAttr 'profile' and found incompatible value 'debug'.
              - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
              - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
              - Required org.gradle.usage 'java-runtime' and found incompatible value 'java-api'.
          - Variant 'debugRuntimeElements':                             
              - Required com.android.build.api.attributes.BuildTypeAttr 'profile' and found incompatible value 'debug'.
              - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
              - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
              - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
          - Variant 'releaseApiElements':                               
              - Required com.android.build.api.attributes.BuildTypeAttr 'profile' and found incompatible value 'release'.
              - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
              - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
              - Required org.gradle.usage 'java-runtime' and found incompatible value 'java-api'.
          - Variant 'releaseRuntimeElements':                           
              - Required com.android.build.api.attributes.BuildTypeAttr 'profile' and found incompatible value 'release'.
              - Found com.android.build.api.attributes.VariantAttr 'release' but wasn't required.
              - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
              - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 6s                                         

what should i do?

@Jairolaya12x
Copy link

How solve this? I have the same problem

@poria-cat
Copy link
Author

Why I close this issue ? Because I have update build.cs to solve it.
just see here #50

At the time, my update resolved these question, but I haven't used this library for a long time😶.

So sorry now i can't help you 🤭

How solve this? I have the same problem

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

2 participants