Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Grind · Feb 01, 2012 at 09:10 AM · androidbuild-errorplugin

Build fails with Android plugin

To start with, I use Unity Pro 3.4.2 with Android Pro on OS X. I'm able to build my project for Android and deploy on the device, it works like a charm. I have also been able to create a java library that I want to use as a Unity plugin, create a java project in Eclipse that uses my library and the Unity project as a library. It works great and my calls from Unity to Java code does what's expected.

The process of using the Unity project as a Java library with Eclipse involves a lot of hands-on steps with copying this and that, and is quite error prone, so I really want to just add my java library as a plugin to have a more streamlined process. Here comes the problem:

As soon as I add any java-code to Assets/Plugins/Android the build fails with an ArgumentException and the console saying "An empty file name is not valid". Details:

Exception: Error building Player: ArgumentException: An empty file name is not valid.
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.

Anyone recognizes this and/or have an idea of what's causing the build to fail?

As a side note, I have problems with configuring the Keystore in Unity, I don't know if it's related but I seem to be able to build and deploy a "clean" project anyway…

Thanks!

FYI, I'm a complete rookie with Android development, and hence, with Unity Android development as well...

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Martin_Gonzalez · Feb 25, 2012 at 10:26 AM

Hi! I have a similar issue. I had 5 prefab and when i wanted to select one unity selected me the five of them. I got this error once ArgumentException: An empty file name is not valid. I dont know why it happened. My solution, i entered to the folder where i had my prefabs (throw windows ex: c:/yourProyect/Assets/PrefabFolder and simply rename them and now works fine. Hope this help you!

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
avatar image
0

Answer by nikbn29 · Nov 08, 2012 at 07:10 AM

If You have integrated any plugins related iOS. Remove them for Android Build. And it will work fine.

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.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Google Play Game Services Plugin "Failed to re-package resources" 2 Answers

PlayerPrefs Plugin. error CS0103: The name `PlayerSettings' does not exist in the current context 2 Answers

How do I correctly install the Facebook SDK plugin? 1 Answer

Game Thrive (One Signal) causes game to crash when calling init method. 1 Answer

Error building Player: CommandInvokationFailure: 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