• 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
0
Question by justin.hu · Jan 11, 2016 at 01:17 PM · androidandroidpluginandroidjavaobject

NotFoundException: File res/mipmap-xhdpi-v4/ic_launcher.png from xml type layout resource

I use Unity call UnityPlayerActivity. In UnityPlayerActivity onCreate method .I use the flollowing code to add a view : LayoutInflater inflater = LayoutInflater.from(currentActivity); View adLayout = inflater.inflate(R.layout.banneradlayout, null); ImageAdBannerView adView = (ImageAdBannerView)adLayout.findViewById(R.id.banner);

when the app runing ,it shows the following errors: 01-08 11:00:56.619: E/AndroidRuntime(23532): FATAL EXCEPTION: main 01-08 11:00:56.619: E/AndroidRuntime(23532): java.lang.Error: FATAL EXCEPTION [main] 01-08 11:00:56.619: E/AndroidRuntime(23532): Unity version : 5.3.0f4 01-08 11:00:56.619: E/AndroidRuntime(23532): Device model : samsung SM-G7108V 01-08 11:00:56.619: E/AndroidRuntime(23532): Device fingerprint: samsung/ms01ltezm/ms01lte:4.3/JLS36C/G7108VZMUANK2:user/release-keys 01-08 11:00:56.619: E/AndroidRuntime(23532): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appcoachs.unitysdkandroidproj/com.appcoachs.unitysdkandroidproj.Main2Activity}: android.content.res.Resources$NotFoundException: File res/mipmap-xhdpi-v4/ic_launcher.png from xml type layout resource ID #0x7f030000 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2362) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread.access$700(ActivityThread.java:168) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1329) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.os.Handler.dispatchMessage(Handler.java:99) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.os.Looper.loop(Looper.java:176) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread.main(ActivityThread.java:5493) 01-08 11:00:56.619: E/AndroidRuntime(23532): at java.lang.reflect.Method.invokeNative(Native Method) 01-08 11:00:56.619: E/AndroidRuntime(23532): at java.lang.reflect.Method.invoke(Method.java:525) 01-08 11:00:56.619: E/AndroidRuntime(23532): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225) 01-08 11:00:56.619: E/AndroidRuntime(23532): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1041) 01-08 11:00:56.619: E/AndroidRuntime(23532): at dalvik.system.NativeStart.main(Native Method) 01-08 11:00:56.619: E/AndroidRuntime(23532): Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-xhdpi-v4/ic_launcher.png from xml type layout resource ID #0x7f030000 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3242) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3189) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.Resources.getLayout(Resources.java:1797) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.view.LayoutInflater.inflate(LayoutInflater.java:424) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.view.LayoutInflater.inflate(LayoutInflater.java:382) 01-08 11:00:56.619: E/AndroidRuntime(23532): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:361) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.Activity.setContentView(Activity.java:1956) 01-08 11:00:56.619: E/AndroidRuntime(23532): at com.appcoachs.unitysdkandroidproj.Main2Activity.onCreate(Main2Activity.java:13) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.Activity.performCreate(Activity.java:5372) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270) 01-08 11:00:56.619: E/AndroidRuntime(23532): ... 11 more 01-08 11:00:56.619: E/AndroidRuntime(23532): Caused by: java.io.FileNotFoundException: Corrupt XML binary file 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.AssetManager.openXmlAssetNative(Native Method) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488) 01-08 11:00:56.619: E/AndroidRuntime(23532): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3220) 01-08 11:00:56.619: E/AndroidRuntime(23532): ... 21 more 01-08 11:00:56.629: I/ActivityManager(593): Notify an ApplicationCrash

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

0 Replies

· Add your reply
  • Sort: 

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

AndroidJavaClass Won't initialize in Start() 1 Answer

AndroidJavaException - java.lang.ClassNotFoundException 1 Answer

What I have to do to add com.unity3d to my Android game? 0 Answers

Get Phone number of android mobile device - Android native code to Unity c# 3 Answers

Using AndroidJavaProxy with abstract class 0 Answers


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