#StackBounty: #c# #unity3d AddRelativeForce() causes unwanted turning

Bounty: 50

I’ve create a movement script that moves a character (ship) in a topdown view.
Gravity is disabled, but the rest of the settings i left mostly alone.

I’m applying a constant force in the forward or backward direction (local, so relative to the character NOT the world). This however causes some movement in other directions if the character is rotated for some reason.

                Debug.Log(nameof(force) + force);

                rigidBody2D.AddRelativeForce(force);

Lets me explain with pictures.

Starting point:
enter image description here

Moving forward somewhat (works okay):
enter image description here

Back to starting point (stopping game, starting anew)
And then i manually change the rotation to -90 in the inspector.
I then move forward somewhat.

enter image description here

As we can see since the rotation is -90, moving forward in relative to the character (AddRelativeForce(..)) causes it to move to the right on the screen.
The X position increments accordingly.

However, also the Y component changes, the character gets velocity in this direction, even though i apply no force in that direction – which we can see in the output.

How can I move my character with force without this issue?


Get this bounty!!!

#StackBounty: #c# #unity3d #2d #raycasting Instantiate predefined number of object along a raycast in Unity

Bounty: 100

I have a raycast that’s being rendered every frame based on 2 points, and those 2 points change position each frame.

What I need is a system that doesn’t need a direction, or a number of objects, but instead takes in 2 points, and then instantiates or destroys as many objects as necessary to get the instantiated objects from one side to another minus spaceBetweenPoints. If you wanted you could think of it as an Angry Birds Style slingshot HUD, except without gravity, and based on raycasts.

My Script:

    public int numOfPoints; // The number of points that are generated (This would need to chnage based one the distance in the end)
    public float spaceBetweenPoints; // The spacing between the generated points
    private GameObject[] predictionPoints; // The prefab to be gernerated
    private Vector2 firstPathStart; // The starting point for the raycast (Changes each frame)
    private Vector2 firstPathEnd; // The ending point for the raycast (Changes each frame)
    
    void start()
    {
         predictionPoints = new GameObject[numOfPoints];
         for (int i = 0; i < numOfPoints; i++)
         {
              predictionPoints[i] = Instantiate(predictionPointPrefab, firePoint.position, 
              Quaternion.identity);
         }
    }

    void Update
    {
         Debug.DrawLine(firstPathStart, firstPathEnd, UnityEngine.Color.black);
         DrawPredictionDisplay();
    }

    void DrawPredictionDisplay()
    {
         for (int i = 0; i < numOfPoints; i++)
        {
            predictionPoints[i].transform.position = predictionPointPosition(i * spaceBetweenPoints);
        }
    }

    Vector2 predictionPointPosition(float time)
    {
        Vector2 position = (Vector2)firstPathStart + direction.normalized * 10f * time;
        return position;
    }

The current system simply takes in a starting position, a direction, and then moves a preset number of objects in that direction based on time. This way of doing it also causes problems because it’s endess instead of only going till the end of the raycast: (Pardon my drawing skills)

Exampel Image

Blue line = raycast
Black dots = instantiated prefab
Orange dot = raycast orange
Green dot = end of raycast

Notes:

  • direction is the momentum which I set in the editor, I needed it to put together what I currently have working, but it shouldn’t be necessary when running based on points.


Get this bounty!!!

#StackBounty: #unity3d #continuous-integration #gitlab #gitlab-ci #gitlab-ci-runner Gitlab-CI: set different variables/paths depending …

Bounty: 100

I am using Gitlab CI to automate my unity builds. For this I use two machines. (one Mac and one windows machine. Important: build should only run on the first machine that is available. )

unity-build:
  script: "/Applications/Unity/Hub/Editor/2019.3.14f1/Unity.app/Contents/MacOS/Unity       
  -projectPath pathXY 
  -executeMethod BuildScript.PerformBuild
  -quit"
  stage: build
  tags:
    - unity-mac-runner, unity windows runner

The problematic line is this: script: "/Applications/Unity/Hub/Editor/2019.3.14f1/Unity.app/Contents/MacOS/Unity, because on my windows runner path to unity is "S:Unity2019.3.14f1EditorUnity.exe"

Tried to fix this with these changes:

windows job:
  stage: setpaths
  variables:
    UNITY_PATH: "S:/Unity/2019.3.14f1/Editor/Unity.exe"
  script: "set windows variables..."
  tags:
    - unity windows runner
#osx job:
#  stage: setpaths
#  variables:
#    UNITY_PATH: "S:/Unity/2019.3.14f1/Editor/Unity.exe"
#  script: "set mac variables..."
#  tags:
#    - unity-mac-runner

Questions

  1. How can I do this? What should I use?
  2. I tried to set path of unity installation depending on build runner, but I couldn’t get this to work.

An example would be nice. Thx a lot 😉


Get this bounty!!!

#StackBounty: #android #unity3d #gradle #android-ndk #il2cpp Unity Build – Exception: il2cpp.exe did not run properly

Bounty: 50

Using Unity 2017.4.34f1 (LTS) with IL2CPP with NDK r13b, I try to export my Unity Project to Android Project (Build Process).

Note: I’m using IL2CPP because Google PlayStore want both 32 & 64bit, so i cant use Mono anymore as scripting backend.

However, it’s failed and I got below error:

Exception: C:Program FilesUnityHubEditor2017.4.34f1EditorDatail2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

and one more error log:

Failed running C:Program FilesUnityHubEditor2017.4.34f1EditorDatail2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --development-mode --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:UserszukinaruDesktoporisnowyndoTemp/StagingAreaassetsbinDataNativearmeabi-v7alibil2cpp.so" --cachedirectory="C:UserszukinaruDesktoporisnowyndoAssets..Libraryil2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:Program FilesUnityHubEditor2017.4.34f1EditorDataPlaybackEnginesAndroidPlayer/Toolsbdwgc/include" --additional-include-directories="C:Program FilesUnityHubEditor2017.4.34f1EditorDataPlaybackEnginesAndroidPlayer/Toolslibil2cpp/include" --tool-chain-path="C:/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:Program FilesUnityHubEditor2017.4.34f1EditorDataToolsMapFileParserMapFileParser.exe" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedAssembly-CSharp-firstpass.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedAssembly-CSharp.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedUnityEngine.UI.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedDOTween.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedFacebook.Unity.Settings.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedPlayMaker.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedTextMeshPro-1.0.55.2017.1.0b12.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedUnityEngine.Analytics.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedUnityEngine.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedFacebook.Unity.Android.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedFacebook.Unity.Canvas.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedFacebook.Unity.IOS.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedmscorlib.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedStores.dll" --assembly="C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataManagedUnityEngine.Purchasing.dll" --generatedcppdir="C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput" 

stdout:
Building libil2cpp.so with AndroidToolChain.
    Output directory: C:UserszukinaruDesktoporisnowyndoTempStagingAreaassetsbinDataNativearmeabi-v7a
    Cache directory: C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache
ObjectFiles: 691 of which compiled: 282
    Time Compile: 54396 milliseconds Il2CppAttributes.cpp
    Time Compile: 23198 milliseconds Bulk_TextMeshPro-1.0.55.2017.1.0b12_0.cpp
    Time Compile: 21138 milliseconds Il2CppInvokerTable.cpp
    Time Compile: 20951 milliseconds Bulk_mscorlib_16.cpp
    Time Compile: 16387 milliseconds Bulk_Assembly-CSharp_19.cpp
    Time Compile: 15667 milliseconds Bulk_mscorlib_17.cpp
    Time Compile: 13478 milliseconds GenericMethods24.cpp
    Time Compile: 13394 milliseconds Il2CppMetadataUsage.cpp
    Time Compile: 13278 milliseconds Bulk_Mad2D_0.cpp
    Time Compile: 12015 milliseconds Bulk_mscorlib_10.cpp
Total compilation time: 765251 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:android-ndk-r13b-windows-x86_64android-ndk-r13btoolchainsllvmprebuiltwindows-x86_64binclang++ @"C:UserszukinaruAppDataLocalTemptmp56A5.tmp" -o "C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cachelinkresult_6D290C36A270BA4A86083617583BFE15libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:android-ndk-r13b-windows-x86_64android-ndk-r13bplatformsandroid-16arch-arm" -gcc-toolchain "C:android-ndk-r13b-windows-x86_64android-ndk-r13btoolchainsarm-linux-androideabi-4.9prebuiltwindows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:android-ndk-r13b-windows-x86_64android-ndk-r13bsourcescxx-stlgnu-libstdc++4.9libsarmeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cachelinkresult_6D290C36A270BA4A86083617583BFE15libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd.exe

clang++.exe: warning: argument unused during compilation: '-pie'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)
stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:android-ndk-r13b-windows-x86_64android-ndk-r13btoolchainsllvmprebuiltwindows-x86_64binclang++ @"C:UserszukinaruAppDataLocalTemptmp56A5.tmp" -o "C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cachelinkresult_6D290C36A270BA4A86083617583BFE15libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:android-ndk-r13b-windows-x86_64android-ndk-r13bplatformsandroid-16arch-arm" -gcc-toolchain "C:android-ndk-r13b-windows-x86_64android-ndk-r13btoolchainsarm-linux-androideabi-4.9prebuiltwindows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:android-ndk-r13b-windows-x86_64android-ndk-r13bsourcescxx-stlgnu-libstdc++4.9libsarmeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cachelinkresult_6D290C36A270BA4A86083617583BFE15libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd.exe

clang++.exe: warning: argument unused during compilation: '-pie'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
C:UserszukinaruDesktoporisnowyndoLibraryil2cpp_android_armeabi-v7ail2cpp_cache43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
C:UserszukinaruDesktoporisnowyndoTempStagingAreaIl2Cppil2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

What I’ve Done so far:

1) Try to use NDK r16b, but failed because Unity 2017.4 only want NDK r13b

2) Run Unity as Administrator, but still not solve

==UPDATE LOG (Unity 2017.4.39):

Exception: C:Program FilesUnityHubEditor2017.4.39f1EditorDatail2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

===UPDATE (Unity 2017.4.8f1)

Has Tried with Unity 2017.4.8f1 (The Original where i was succesfull build APK) but still failed to export to Android Studio Project with x64 (IL2CPP), I’m planning to build AppBundle x64 using exported Android Native/Android Studio.

If using internal (32bit) it was succesfull, but Google now need x64 APK/AppBundle Build. If i knew this before, i would using IL2CPP from beginning (not internal), it’s so frustating error to solve. If i’m doing migration to Unity 2019 now, too much effort to do…


Get this bounty!!!

#StackBounty: #unity3d #unityhub How to install unity3D as of 10/03/2020

Bounty: 100

Since people are not reading my post, BIG PREFACE :

PREVIOUS SOLUTION (A) :

(the one you guys keep linking to without reading) : https://askubuntu.com/a/1078159/307184

does not work.

for one:

  1. the devs have stopped posting builds there. they used to post bimonthly, the last post and build dates back to a year. it is critically out of date.

for two:

  1. it is not the prefered and recomended install method for linux/ubuntu by the unity devs. they prefer we use the unity hub.

PREVIOUS SOLUTION (B) :

I actually already referenced this one with my video link in the original version of my question.

here’s the video link

https://youtu.be/vBs7csdlsgI

and here the associated stackoverflow response in the same exact thread :
https://askubuntu.com/a/1109342/307184

by the same guy since the stackoverflow and source he links names match and since the ubuntu desktop cusomisations are exactly the same in the youtube video and the gif.

This guy has got the right idea!! if a developer makes a native solution for you, you try that first.

but as you can see in his stackoverflow answer and video: things have changed even more still since the release of that launcher.

the launcher is no longer missing any dependencies pre-launch, it runs out-of-the-box on a vanilla ubuntu 19.10 with nothing else changed. that’s one difference. also it looks and behaves nothing alike visually.

it’s a v2.

and it does have it’s own quirks. some very breaking changes if you’ll be so kind as to read on…


QUESTION:

what is the method today?

TODAY

I try to use the “Unity Hub” which is the recommended (and only?) method to instal unity on ubuntu.

I first have to add a license, then I have to set the download folder (which is ignored since it downloads to /tmp anyways)

then I have to select and download a unity version :

choose a unity version to download

downloading unity

once the download finishes it looks like this :

no result

if I, at this point, choose the project tab and hit “new” it still rejects me :

no editor installed, please install unity before creating a project

If I try to open the folder I find in /tmp; “unityhub-9fbe5a20-6305-11ea-bdba-858cc54fd2fc”
with what seems like the right set of files : “Unity.tar.xz”, “UnitySetup-Linux-IL2CPP-Support-for-Editor-2020.1.0a25.tar.xz”, ect… then it just adds a new item named after the grandparent of that item (if I select “/tmp/unityhub-9fbe5a20-6305-11ea-bdba-858cc54fd2fc/Unity.tar.xz” it will be called “tmp”, and I can no longer add another item from the entire /tmp tree because itt considers that it is the “same item”. if I rename the folder and move it to “~/Documents” and open “~/Documents/unityEngine/Unity.tar.xz”, the item in the list will be called “Documents”) :

locate result

If I then try creating a new project, the window opens up but :

create new project

… upon clicking “create” I get a contentless error message box and from there on out the app bugs out and becomes more or less unresponsive and must be closed by force :

error box and crash
the three error windows


Get this bounty!!!

#StackBounty: #c# #unity3d #bezier How to make game objects follow a path in order in Unity along a bezier curve

Bounty: 50

I have a single Object moving along a Bezier Curve but i have multiple objects that need to follow this path in order but they all follow at the same time.The object is a snake type enemy in a space shooter game.

I have so far tried to make all objects children but in doing this they remain in a straight line to the parent when follow the Bezier Curve.
I have also made all objects separate and attached the Bezier Script to these so they all follow the same route and this works but only they follow the same path at the same time.

public class BezierFollow : MonoBehaviour{

[SerializeField]
private Transform[] routes;

private int routeToGo;

private float tParam;

private Vector2 enemyPosition;

[SerializeField]
public float speedModifier = 0.5f;

private bool coroutineAloud;


// Start is called before the first frame update
void Start()
{
    routeToGo = 0;
    tParam = 0f;
    //speedModifier = 0.5f;
    coroutineAloud = true;
}

// Update is called once per frame
void Update()
{
    if (coroutineAloud)
    {
        StartCoroutine(GoByTheRouteRoutine(routeToGo));
    }
}

private IEnumerator GoByTheRouteRoutine(int routeNumber)
{
    coroutineAloud = false;

    Vector2 p0 = routes[routeNumber].GetChild(0).position;
    Vector2 p1 = routes[routeNumber].GetChild(1).position;
    Vector2 p2 = routes[routeNumber].GetChild(2).position;
    Vector2 p3 = routes[routeNumber].GetChild(3).position;

    while(tParam < 1)
    {
        tParam += Time.deltaTime * speedModifier;

        enemyPosition = Mathf.Pow(1 - tParam, 3) * p0 +
            3 * Mathf.Pow(1 - tParam, 2) * tParam * p1 +
            3 * (1 - tParam) * Mathf.Pow(tParam, 2) * p2 +
            Mathf.Pow(tParam, 3) * p3;

        transform.position = enemyPosition;
        yield return new WaitForEndOfFrame();
    }

    tParam = 0f;

    routeToGo += 1;

    if(routeToGo > routes.Length - 1)
        routeToGo = 0;

    coroutineAloud = true;

}}

Here is the routes script i don’t think you will need but will include this

public class Route : MonoBehaviour{
[SerializeField]
private Transform[] controlPoints;

private Vector2 gizmosPos;

private void OnDrawGizmos()
{
    for(float t = 0; t <= 1; t += 0.05f)
    {
        gizmosPos = Mathf.Pow(1 - t, 3) * controlPoints[0].position +
            3 * Mathf.Pow(1 - t, 2) * t * controlPoints[1].position +
            3 * (1 - t) * Mathf.Pow(t, 2) * controlPoints[2].position +
            Mathf.Pow(t, 3) * controlPoints[3].position;

        Gizmos.DrawSphere(gizmosPos, 0.25f);
    }

    Gizmos.DrawLine(new Vector2(controlPoints[0].position.x, controlPoints[0].position.y),
        new Vector2(controlPoints[1].position.x, controlPoints[1].position.y));

    Gizmos.DrawLine(new Vector2(controlPoints[2].position.x, controlPoints[2].position.y),
       new Vector2(controlPoints[3].position.x, controlPoints[3].position.y));
}}

I think what i need to do is have each object not be a child object and all have the script attached to follow the route but also have a delayed time before it follows along the path but not sure how to go about this. I was thinking this might need to be done in a separate script because in the bezier curve script it is set so the object starts again at the beginning of the route once reaches the end


Get this bounty!!!

#StackBounty: #android #firebase #unity3d #exception #crash Unity-Android-App Crashes when Run First Time but From Second Time it Works…

Bounty: 50

I have implemented Firebase Analytics and Firebase Messaging after download the plugin from Google we site and successfully running the Resolvers.
The problem is after build when App is Run FIRST TIME it crashes with the following error but from 2nd time onwards the app does not crash
Here is the log

FATAL EXCEPTION: main
    Process: com.lemontart.flying.robot.car.transformation, PID: 27861
    java.lang.RuntimeException: Unable to instantiate service com.google.firebase.messaging.cpp.ListenerService: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.messaging.cpp.ListenerService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk"],nativeLibraryDirectories=[/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/lib/arm, /data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk!/lib/armeabi-v7a, /system/lib]]
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3654)
        at android.app.ActivityThread.access$1500(ActivityThread.java:207)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6863)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.messaging.cpp.ListenerService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk"],nativeLibraryDirectories=[/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/lib/arm, /data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk!/lib/armeabi-v7a, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:103)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3649)
        at android.app.ActivityThread.access$1500(ActivityThread.java:207) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6863) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
        Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/messaging/FirebaseMessagingService;
        at java.lang.VMClassLoader.findLoadedClass(Native Method)
        at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
                ... 11 more
     Caused by: java.lang.ClassNotFoundException: com.google.firebase.messaging.FirebaseMessagingService
        at java.lang.VMClassLoader.findLoadedClass(Native Method)
        at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                ... 14 more
     Caused by: java.lang.IllegalAccessError: Class com.google.firebase.iid.zzb extended by class com.google.firebase.messaging.FirebaseMessagingService is inaccessible (declaration of 'com.google.firebase.messaging.FirebaseMessagingService' appears in base.apk)
                ... 14 more
2019-05-17 12:55:18.960 27861-27861/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.lemontart.flying.robot.car.transformation, PID: 27861
    java.lang.Error: FATAL EXCEPTION [main]
    Unity version     : 2018.3.14f1
    Device model      : OnePlus ONEPLUS A5000
    Device fingerprint: OnePlus/OnePlus5/OnePlus5:9/PKQ1.180716.001/1904191514:user/release-keys

    Caused by: java.lang.RuntimeException: Unable to instantiate service com.google.firebase.messaging.cpp.ListenerService: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.messaging.cpp.ListenerService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk"],nativeLibraryDirectories=[/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/lib/arm, /data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk!/lib/armeabi-v7a, /system/lib]]
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3654)
        at android.app.ActivityThread.access$1500(ActivityThread.java:207)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6863)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.messaging.cpp.ListenerService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk"],nativeLibraryDirectories=[/data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/lib/arm, /data/app/com.lemontart.flying.robot.car.transformation-EVwlnR7Mxf4TO-7_HvK44w==/base.apk!/lib/armeabi-v7a, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:103)
        at android.app.ActivityThread.handleCreateService(ActivityThread.java:3649)
        at android.app.ActivityThread.access$1500(ActivityThread.java:207) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6863) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
        Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/messaging/FirebaseMessagingService;
        at java.lang.VMClassLoader.findLoadedClass(Native Method)
        at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)

I an see there are all the jars and aars present it the project, still I am not able to figure our the problem.
Here is my gradle file

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
**BUILD_SCRIPT_DEPS**}
}

allprojects {
    repositories {
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

// Android Resolver Repos Start
allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        maven {
            url "https://maven.google.com/" // Assets/Consoliads/Editor/ConsoliAdsDependencies.xml:7
        }
        maven {
            url "file:////Volumes/JawadData/Unity%20Projects/Consoli%204.6.2%20Unity%202018/Assets/Firebase/m2repository" // Assets/Firebase/Editor/AnalyticsDependencies.xml:22, Assets/Firebase/Editor/AppDependencies.xml:22
        }
        mavenLocal()
        jcenter()
        mavenCentral()
    }
}
// Android Resolver Repos End
apply plugin: 'com.android.application'
**APPLY_PLUGINS**

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:multidex:1.0.1'

**DEPS**}

android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        multiDexEnabled true
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
    }

    lintOptions {
        abortOnError false
    }

    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
    }**SIGN**

    buildTypes {
        debug {
            minifyEnabled **MINIFY_DEBUG**
            useProguard **PROGUARD_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            useProguard **PROGUARD_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****SPLITS**
**BUILT_APK_LOCATION**
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}**SPLITS_VERSION_CODE****REPOSITORIES****SOURCE_BUILD_SETUP**

I need to fix this issue, please help it will be highly appreciated.
Thanks


Get this bounty!!!

#StackBounty: #ios #android-studio #unity3d #sdk How to Start Integrated Project From Android Or IOS Platform To Unity3D?

Bounty: 50

I am looking for a way to integrated the Project from Android or IOS platform to make it available in Unity3D.

The Project i would like to implement in unity is from here since this is free and i saw like it is easy to use :

https://pay.cards/pages/sdk.html

What i need to know from the begining to start to make the class or function from Android platform or IOS platform to be available to use in Unity3D ?

Any detail explanation and the tips step by step to combine and make the Android and IOS platform Project to be able to use in Unity3D is very appreciate. And this will be usefull for every Unity3D developer that would like to do a same thing like me.

I know that there is a post also discuss about some kind of this. But i really cannot find the detail explanation how is the way to do it and how to start.

So i have the example from the link above which provide an Project from Android and IOS platform which is a suitable for you to make an example since that link and scan credit card really i need it.

I also not sure from the Project above which function is use to scan the and do the process of scan credit card. So what actually which file do we need from the Project above ? Do we need all of them ? or maybe we just need some of that core file ?

I know that unity can read .aar file which is build from Android Studio and then use it in Unity3D. But from the Project above do we just open the project and then build it into .aar file without any modification or change to the code ?

So how is the way to call the function from .aar in the Unity3D ?

What about the IOS Project platform ? can we build into .aar file too ?

Thank You For every Explanation and Tips Before.

Please do not Down Vote or Close this question. If you find that is not related to the TAG or something else. But i see this is a good question.

Edited :
Please correct if there any miss explanation from the question.


Get this bounty!!!

#StackBounty: #android #unity3d #crash #admob #android-9.0-pie Android 9 Pie crash (com.google.android.gms… ClassNotFoundException)

Bounty: 150

I have a Unity3D game published on Android, and it have worked well so far.
However, the Android Vitals Dashboard is now reporting a lot of crashes. Here’s the detailed info:

By Android version: Android 9   4500    100.0%

Stacktrace:

java.lang.Error: FATAL EXCEPTION [Thread-360]
Unity version     : 2017.3.1p3
Device model      : Google Pixel
Device fingerprint: google/sailfish/sailfish:9/PQ2A.190305.002/5240760:user/release-keys
Caused by
  at lt.b (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
  at ls.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
  at lu.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:18)
  at com.google.android.gms.ads.internal.util.ar.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:10)
  at kx.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:7)
  at kx.run (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at ac.loadClass (com.google.android.gms.dynamite_dynamiteloader@16089081@16.0.89 (100400-239467275):4)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

My AndroidResolverDependencies.xml file:

<dependencies>
  <packages>
    <package>com.android.support:customtabs:[26.0.0, 27.2.0[</package>
    <package>com.android.support:support-v4:[26.0.0, 27.2.0[</package>
    <package>com.google.android.gms:play-services-ads:17.2.0</package>
    <package>com.google.android.gms:play-services-analytics:11.8.0</package>
    <package>com.google.android.gms:play-services-base:[10.2.1, 12.1.0[</package>
    <package>com.google.android.gms:play-services-location:[10.2.1, 12.1.0[</package>
    <package>com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[</package>
  </packages>
  <files>
    <file>Assets/Plugins/Android/android.arch.core.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.core.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.livedata-core-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.viewmodel-1.1.0.aar</file>
    <file>Assets/Plugins/Android/com.android.support.customtabs-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-annotations-27.1.1.jar</file>
    <file>Assets/Plugins/Android/com.android.support.support-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-ui-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-utils-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-fragment-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-media-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-v4-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-base-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-16.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-gass-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-location-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-places-placereport-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-stats-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tagmanager-v4-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.auto.value.auto-value-annotations-1.6.jar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-common-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-17.1.2.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-interop-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-measurement-connector-17.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-messaging-17.6.0.aar</file>
  </files>
</dependencies>
Target API level: 28
Minimum API level: 16

I’ve seen a similar thread in Google AdMob’s discussion group suggesting to add the following to the AndroidManifest.xml file:

<uses-library android:name="org.apache.http.legacy" android:required="false" />

However:

  1. I’m not sure the problem is caused by any apache-related API.
  2. I’m afraid this will restrict the number of installs in my app since it will be available to a smaller audience in Google Play due to the uses-library declaration.


Get this bounty!!!