question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android build error

See original GitHub issue

Hi, I encountered this error when trying to build my project to android. After import all assets build crash with error which I attached below Is that a my mistake, or may be someone have any ideas or workarounds?

Scripts have compiler errors. 
19793
(Filename: ./Runtime/Utilities/Argv.cpp Line: 376)
19794

19795

19796
Aborting batchmode due to failure:
19797
Scripts have compiler errors.
19798

19799
[Performance] Application.InitializeProject                                 :        1 samples, Peak.  1.36 ks (1.0x), Avg.  1.36 ks, Total. 1.360 ks (99.9%)
19800
[Performance] Application.PackageManager.StartServer                        :        1 samples, Peak.  3.89 ms (1.0x), Avg.  3.89 ms, Total. 3.895 ms (0.0%)
19801
[Performance] Application.IsBrowserCacheEmpty                               :        1 samples, Peak.   710 us (1.0x), Avg.   710 us, Total. 709.6 us (0.0%)
19802
[Performance] Application.AcquireProjectLock                                :        1 samples, Peak.  2.37 ms (1.0x), Avg.  2.37 ms, Total. 2.371 ms (0.0%)
19803
[Performance] Application.InitializeEngineNoGraphics                        :        1 samples, Peak.   394 ms (1.0x), Avg.   394 ms, Total. 393.5 ms (0.0%)
19804
[Performance] Application.PackageManager.Initialize                         :        1 samples, Peak.   884 ms (1.0x), Avg.   884 ms, Total. 883.8 ms (0.1%)
19805
[Performance] CurlRequestCheck                                              :       18 samples, Peak.   213 us (5.4x), Avg.  39.7 us, Total. 713.8 us (0.0%)
19806
[Performance] PackageManager::RunRequestSynchronously                       :      621 samples, Peak.   565 us (27.8x), Avg.  20.3 us, Total. 12.61 ms (0.0%)
19807
[Performance] Application.EngineGraphics.Initialize                         :        1 samples, Peak.  2.33 s (1.0x), Avg.  2.33 s, Total. 2.332 s (0.2%)
19808
[Performance] Application.GI.Initialize                                     :        1 samples, Peak.   860 ms (1.0x), Avg.   860 ms, Total. 859.7 ms (0.1%)
19809
[Performance] Application.LoadAllDefaultResourcesFromEditor                 :        1 samples, Peak.  5.20 ms (1.0x), Avg.  5.20 ms, Total. 5.201 ms (0.0%)
19810
[Performance] Application.LoadMonoAssemblies                                :        1 samples, Peak.  3.67 s (1.0x), Avg.  3.67 s, Total. 3.674 s (0.3%)
19811
[Performance] ProcessService.EditorAfterLoadAllAssemblies                   :        3 samples, Peak.  57.9 ms (1.4x), Avg.  41.9 ms, Total. 125.8 ms (0.0%)
19812
[Performance] Application.ReadLicenseInfo                                   :        1 samples, Peak.  10.1 ms (1.0x), Avg.  10.1 ms, Total. 10.06 ms (0.0%)
19813
[Performance] Application.InitialScriptRefresh                              :        1 samples, Peak.   318 s (1.0x), Avg.   318 s, Total. 318.4 s (23.4%)
19814
[Performance] BuildCatalog                                                  :        2 samples, Peak.   324 ms (1.2x), Avg.   272 ms, Total. 544.5 ms (0.0%)
19815
[Performance] Application.AssetDatabase.Refresh                             :        1 samples, Peak.   997 s (1.0x), Avg.   997 s, Total. 996.6 s (73.2%)
19816
[Performance] SceneDataContainer.TransformHierarchyChangedSetParentCallback :    34131 samples, Peak.  89.3 us (101.8x), Avg.   877 ns, Total. 29.95 ms (0.0%)
19817
[Performance] SceneVisibilityState.IsFlagSetInParents                       :   106275 samples, Peak.  88.5 us (178.3x), Avg.   496 ns, Total. 52.76 ms (0.0%)
19818
[Performance] Application.ImportAssetsWithMismatchingAssetImporterVersion   :        1 samples, Peak.   552 ms (1.0x), Avg.   552 ms, Total. 552.1 ms (0.0%)
19819
[Performance] Application.SyncCurrentColorSpace                             :        1 samples, Peak.   179 ms (1.0x), Avg.   179 ms, Total. 178.9 ms (0.0%)
19820
[Performance] Application.OnUsbDevicesChanged                               :        1 samples, Peak.  10.2 us (1.0x), Avg.  10.2 us, Total. 10.20 us (0.0%)
19821
[Performance] Application.AssetDatabase.SaveAssets                          :        1 samples, Peak.   498 ms (1.0x), Avg.   498 ms, Total. 498.0 ms (0.0%)
19822
[Performance] Application.AssetInstanceCacheUpdate                          :        1 samples, Peak.   300 ns (1.0x), Avg.   300 ns, Total. 300.0 ns (0.0%)
19823
[Performance] Application.UnityExtensions.Initialize                        :        1 samples, Peak.  2.90 ms (1.0x), Avg.  2.90 ms, Total. 2.903 ms (0.0%)
19824
[Performance] Application.InitializeManagedCompilationPipeline              :        1 samples, Peak.   195 ms (1.0x), Avg.   195 ms, Total. 195.0 ms (0.0%)
19825
[Performance] Application.ExecuteStartups                                   :        1 samples, Peak.   236 ms (1.0x), Avg.   236 ms, Total. 235.7 ms (0.0%)
19826
[Performance] Application.RebuildOSMenu                                     :        1 samples, Peak.  74.4 ms (1.0x), Avg.  74.4 ms, Total. 74.40 ms (0.0%)
19827
[Performance] UpdateAllMenus                                                :        1 samples, Peak.  74.4 ms (1.0x), Avg.  74.4 ms, Total. 74.39 ms (0.0%)
19828
[Performance] Application.editorInitializingProject                         :        1 samples, Peak.  29.3 us (1.0x), Avg.  29.3 us, Total. 29.30 us (0.0%)
19829
[Performance] GUIView.RepaintAll.PlayerLoopController                       :        1 samples, Peak.   900 ns (1.0x), Avg.   900 ns, Total. 900.0 ns (0.0%)
19830
[Performance] Application.InvokeFinishedLoadingProject                      :        1 samples, Peak.  70.5 ms (1.0x), Avg.  70.5 ms, Total. 70.49 ms (0.0%)
19831
[Performance] ProcessService.OnProjectLoaded                                :        1 samples, Peak.  56.9 ms (1.0x), Avg.  56.9 ms, Total. 56.93 ms (0.0%)
19832
Cleanup mono
19833
debugger-agent: Unable to listen on 38
19834
geForIconForExtension
19835
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19836
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19837
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19838
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19839
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19840
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19841
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19842
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19843
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19844
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19845
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19846
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19847
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19848
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19849
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19850
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19851
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19852
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19853
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19854
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19855
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19856
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19857
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19858
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19859
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19860
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19861
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19862
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19863
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19864
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19865
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19866
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19867
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19868
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19869
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19870
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19871
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19872
./Editor/Platform/Linux/TempStubs.cpp:PlatformImageForIconForExtension
19873
Compressing using quality level 127
19874
./Editor/Platform/Linux/UsbDevices.cpp:UsbDevicesQuery
19875
Build failed, with exit code 1
19876

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
iserofeevcommented, Nov 3, 2020

Hey, yes, build to android is possible, and I successfully did it.

In my case it was unobvious mistake, the default build scripts add Environment namespace to parse arguments, and at the same time Environment namespace already exists in my project, and it’s mean game environment 😄. So, when I tried to build on my machine everything was well, but crashing on CI. May be need to call parse method with System.Environment to avoid in future.

Now to your problem. After I solve problem that described above, I ran into problem like your. As far, as i understand, errors with JDK, SDK and NDK are related to docker images. So, in new v2.0-alpha-1 docker images using android tools installed with unity hub. But, it will crash because when unity start argument -batchmode repeated twice.

I’m sure it will be fixed in future, because it’s alpha, so if you want to use it right now, I made little fix to Android builds and until the problem is solved, you can use this:

- name: Build project
        id: build
        uses: iserofeev/unity-builder@aa43a36ab902e8264c44f803bd94b0c921825734
        with:
          unityVersion: 2019.4.13f1
          targetPlatform: Android

Hope, it will help you

1reaction
webbertakkencommented, Nov 9, 2020

This should be solved in the latest alpha version for v2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known issues with Android Studio and Android Gradle Plugin
Known issues with Android Studio and Android Gradle Plugin · Error when rendering Compose Preview · Error when using different passwords for key...
Read more >
[FIXED] Android build failures `No matching variant of ... - GitHub
The build error looks something like this: Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build ...
Read more >
How to fix build failed error in Android Studio? - Stack Overflow
Looks like some linking issue is causing the error. You can try to close android studio and delete .gradle folder and .idea folder...
Read more >
How to fix all build errors in react native(Android specific).
Basically, what this error is trying to tell you is that this particular package does not support the Gradle version you are using...
Read more >
Why does a build fail in Android Studio even if I don't ... - Quora
Build fails are normal in Android studio. I have faced a million times. It may occure if your Android Studio is not updated....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found