Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by UnityCX · Nov 03, 2015 at 01:43 PM · android.netsocketsdll error

Android .NET Sockets .dll problem

There is a tablet type here in Serbia called Tesla Tablets.

My application uses .NET sockets to make a connection between that tablet and a windows machine. The error i get when i start the application on android is:

Unable to find user32.dll Unable to find Kernel32.dll

Which confuses me totally since its running on android.

Is there a way to build thse dll-s into my build?

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 Statement · Nov 03, 2015 at 02:11 PM

user32.dll and Kernel32.dll are native Windows Operating system dynamic link libraries.

No, you can't use those.

I am a bit unsure what the situation is here; But if you added Windows .NET assemblies into your project, remove them from your Assets folders. Mono should have platform independent System.Net.Sockets namespace and you shouldn't have to reference platform specific libraries. You should be able to access System.Net.Sockets without referencing additional libraries.

Comment
Add comment · Show 5 · 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 Statement · Nov 03, 2015 at 02:12 PM 0
Share

To me it sounds like you're using Assemblies that depend on Windows. Did you drag some .NET assemblies into your project?

avatar image UnityCX · Nov 03, 2015 at 02:18 PM 0
Share

Thats what confuses me, and no i didnt. The thing is that the app is working fine on other devices.

avatar image Statement · Nov 03, 2015 at 02:40 PM 0
Share

So you have no references to .NET assemblies (other than the assemblies Unity ships with $$anonymous$$ono?)

What types and methods are you using?

avatar image UnityCX · Nov 03, 2015 at 02:53 PM 0
Share

i just noticed that that error is fired on every device in the ADB of android studio :(, however other devices work. I do reference the .NET and the socets for example udpClient.BeginReciving(). thats where it fails.

avatar image Statement · Nov 03, 2015 at 03:17 PM 0
Share

Just trying to get on the same page of ter$$anonymous$$ology, are you using $$anonymous$$onos Sockets or .NET/$$anonymous$$icrosofts Sockets? You can't expect .NET framework libraries to work, but you should be able to use $$anonymous$$ono framework libraries. Unity should already reference $$anonymous$$ono libraries behind the scenes.

avatar image
0

Answer by UnityCX · Nov 03, 2015 at 06:27 PM

Here is the code:

this method is called on Start() method

 void StartGameClient()
     {
         Debug.LogError ("Strting to listen");
         remote_end = new IPEndPoint(IPAddress.Any, startup_port);
         udp_client = new UdpClient(remote_end);
         udp_client.EnableBroadcast = true;
         udp_client.BeginReceive(new AsyncCallback(ServerLookup),null);
     }

 
 //this method is called every 0.5 seconds.
 void StartBroadcast()
 {
     udp_client = new UdpClient();
     string BroadcastAdress = NetworkHelper.GetIpAdressForBroadcast();
     remote_end = new IPEndPoint (IPAddress.Parse(BroadcastAdress), startup_port);
     Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
     
     s.SendTo(DataToSend, remote_end);
 }

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

38 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

Related Questions

Unity .NET 4.6 Socket Exception 2 Answers

Android App crashes on " server.Start() " HELP 0 Answers

.net sockets login server 0 Answers

Socket: set reusable port failed, error: Protocol not available(92), 0 Answers

Can't install an android Unity app on Android 6.0 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