Compiling Android APK Errors

Hello,

I’m trying to make an android build of my game and, though I have no errors compiling it normally, when I build in android it throws me this errors:


Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Runtime\TMP_UpdateManager.cs(134,36): error CS0246: The type or namespace name ‘ScriptableRenderContext’ could not be found (are you missing a using directive or an assembly reference?)


C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.timeline\Runtime\Animation\AnimationOutputWeightProcessor.cs(21,9): error CS0122: ‘AnimationMotionXToDeltaPlayable’ is inaccessible due to its protection level


C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.timeline\Runtime\Events\Signals\SignalAsset.cs(11,6): error CS0122: ‘AssetFileNameExtensionAttribute’ is inaccessible due to its protection level


Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors

at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194

at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


And I have no idea what they are

Thanks.

You should try upgrading to the latest version of Unity 2019 (2019.4.5f1). Then go into the package manager (Window → Package Manager) to make sure that the related packages are updated to the latest “2019.4 verified” version rather than the latest version (or simply remove them if you don’t need them). The packages you’re looking for are TextMesh Pro and Timeline (under All packages or In Project).

If this still doesn’t work, try closing the project, deleting the Library folder, and then re-opening the project.