• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by jamesk5 · Jun 10, 2019 at 04:43 PM · androiderrortextmeshbug report

HELP! TextMesh Pro not working for Android after upgrading from 2018.2 to 2018.4 (NullReferenceException at TMPro.TMP_Settings.get_defaultStyleSheet() )

Things were working fine in Unity 2018.2. I upgraded to Unity 2018.4, which automatically upgraded my TMP package to v1.3. IL2CPP. Building using cloud build, 2018.4.1f1 (same as editor), and gradle (everything default, I do not customize gradle at all).

Right now, things work fine in the editor and on iOS. But on Android, I get this error logged for every TMP element trying to render:

.

Unity : NullReferenceException: Object reference not set to an instance of an object. at TMPro.TMP_Settings.get_defaultStyleSheet () [0x00000] in :0 at TMPro.TMP_StyleSheet.get_instance () [0x00000] in :0 at TMPro.TextMeshProUGUI.Awake () [0x00000] in :0 (Filename: currently not available on il2cpp Line: -1)

.

I have tried uninstalling and reinstalling TMP via the package manager. I have imported TMP essential assets and I have run the GUID remapper tool (which did not find anything to update). I have opened TMP settings and checked that the default style sheet links to a file that exists (Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset). I have temporarily modified (change something, save project, revert change, save project) this file and many other TMP files to force TMP to regenerate them - this did cause many unexpected changes in the git diff, but it didn't help the result on device. None of the above has helped.

.

Anyone? I'm going on several weeks now without my Android version being broken. :(

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jamesk5 · Jun 17, 2019 at 03:14 AM

This turned to be a result of enabling split APKs by architecture and not properly utilizing the OBB files that are part of the build. You can't install a split APK directly from cloud build, I don't think.

There are two options to fix:

  • Disable split APKs by architecture.

  • If split APKs is enabled, test only by uploading the APKs to the Play Console. Make sure you upload the OBB files in the release, too (by clicking the plus next to the APKs you've uploaded).

EDIT: Hosting OBB files isn't enough, apparently. I don't know, but it seems they need to be loaded intot he game by script similar to how you would with asset bundles.

.

EDIT: Scrap the above. Export as ABB format (available in cloud build android advanced settings). This made everything work. You upload a single ABB file to the play console, and it processes it into separate APKs which contains resources in them instead of using OBB files.

.

Apparently ABB format was already doable via script, meaning you had to define a pre-build method. But now ABB is available in the CB front end which is great.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

257 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Send an activity from C# to Java 0 Answers

CommandInvokationFailure: Failed to re-package resources 1 Answer

Trying to add DotConnection(Clone) (UnityEngine.UI.Image) for graphic rebuild while we are already inside a graphic rebuild loop. This is not supported. 0 Answers

ClassNotFoundException on UnityPlayerProxyActivity on some devices 0 Answers

Fatal signal 11 on Android 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges