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 /
avatar image
0
Question by Carson365 · Jan 02, 2018 at 06:39 PM · androidmobilesdktesting

Android SDK

Hello! I am new to all the Android setup and SDK, so I am wondering how I can be able to test my game on my android device. Please don't leave me a link to a unity forums, but instead tell me how. All I know right now is that you need to install Android Studio but I'm not sure where to go from there :( Please help, thanks

Comment
Add comment · Show 1
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 hexagonius · Jan 02, 2018 at 08:24 PM 0
Share

Well sorry, but why typing what has already been typed:

https://docs.unity3d.com/$$anonymous$$anual/android-GettingStarted.html

The only difference is step two where you use the sdk manager from the installed Android Studio ins$$anonymous$$d of the command line version

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by lspence812 · Jan 02, 2018 at 09:01 PM

Please follow the steps in this link.

https://unity3d.com/learn/tutorials/topics/mobile-touch/building-your-unity-game-android-device-testing

Comment
Add comment · Show 12 · 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 Steve-3d · Jan 02, 2018 at 11:12 PM 0
Share

Hi - This tutorial gets you a long way (I have been following it myself today), but it is slightly outdated, to the point where I am now stuck:

The section titled: "Setting up the Android SD$$anonymous$$ Tools" ends with the bullet-point:

  • Double click the file called android to run it

There is ins$$anonymous$$d an "android.bat" file which states (opening it in an editor) "The "android" command is deprecated. [...] For command-line tools, use tools\bin\sdkmanager.bat"

So - running sdkmanager.bat --list in a cmd ter$$anonymous$$al, gives me:

 Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
         at com.android.repository.api.Schema$$anonymous$$odule$Schema$$anonymous$$oduleVersion.<init>(Schema$$anonymous$$odule.java:156)
         at com.android.repository.api.Schema$$anonymous$$odule.<init>(Schema$$anonymous$$odule.java:75)
         at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
         at com.android.sdklib.tool.Sdk$$anonymous$$anagerCli.main(Sdk$$anonymous$$anagerCli.java:117)
         at com.android.sdklib.tool.Sdk$$anonymous$$anagerCli.main(Sdk$$anonymous$$anagerCli.java:93)
 Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass($$anonymous$$ Source)
         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass($$anonymous$$ Source)
         at java.base/java.lang.ClassLoader.loadClass($$anonymous$$ Source)
         ... 5 more

Note I had followed instructions earlier in the page to install the latest JD$$anonymous$$ (9.0.1) from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html#close

So I'm thinking:

  1. Should I be rebooting after the JD$$anonymous$$ install, or somehow linking this JD$$anonymous$$ version with Unity to make sure the JRE is ok?

  2. $$anonymous$$aybe I should go back and install the full Android Studio - not just these command-line tools as advised in the tutorial. I might have better success with running the Android SD$$anonymous$$ $$anonymous$$anager via the Android Studio?

  3. The tutorial text seemed to imply that the Android SD$$anonymous$$ did not need updating if you had the latest Android OS on your phone (which I do), so I tried ignoring the above and carrying on with the tutorial. However this fais on the Build & Run step: alt text This seemed hopeful in that at least it offerd an "Update Android SD$$anonymous$$" button, but alas - this results in: alt text

Looking at the console for clues, I see that:

  1. It is using the correct jdk-9.0.1\bin\java.exe, but...

  2. It is ultimately trying to run "android update sdk -a -u -t tool,platform-tool,build-tools-23.0.2"

Which (as above) seems to be outdated.

Any ideas on how to proceed - warmly appreciated!

avatar image Carson365 Steve-3d · Jan 02, 2018 at 11:16 PM 1
Share

Haha. Exact same problem. Still trying to figure this issue out. Anyone know what to do?

avatar image Steve-3d Carson365 · Jan 02, 2018 at 11:30 PM 0
Share

At least we are literally on the same page :-)

I'm thinking of going back and installing the full Android Studio - maybe there is a more complete environment to manage the Android SD$$anonymous$$'s (or at least invoke the .bat files correctly under the covers.

avatar image Carson365 Steve-3d · Jan 02, 2018 at 11:33 PM 0
Share

I am actually doing that right now :) If I say it doesn't work, that doesn't mean it doesn't work, but probably means I did something wrong... I'll make sure to keep you updated if I find a solution!

avatar image Steve-3d Carson365 · Jan 03, 2018 at 12:08 AM 0
Share

Ok - So installing Android Studio seems "warmer". After the basic install I can now run the SD$$anonymous$$ $$anonymous$$anager after clicking "Configure->SD$$anonymous$$ $$anonymous$$anager" from the home-screen.

This shows me that Android API 27 is now installed, and I can pick back-versions (I only have 7.0 - Nougat, Platform 24 on my phone). Now installing.

I note that these are going into a different directory (..\AppData\Local\Android\Sdk) - which I will have to point Unity at later.

Show more comments
avatar image
0

Answer by leSamo · Jan 02, 2018 at 08:25 PM

When installing Unity you can choose which platforms do you want to build to in the future. You can choose android there and the installer will do everything for 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 Carson365 · Jan 02, 2018 at 08:34 PM

Oh I guess I wasn't specific enough once I read my queston again. Pretty much I need to be able to test my game on my Android phone. How would I do that? @IeSamo

Comment
Add comment · Show 4 · 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 leSamo · Jan 02, 2018 at 08:54 PM 0
Share

Connect your phone to your PC and turn on USB debugging (google if you don't know how) in the developer options of your phone. When building press "Build and run".

avatar image Carson365 · Jan 02, 2018 at 09:45 PM 0
Share

Ok. Right now I am having trouble getting the SD$$anonymous$$. I downloaded Android Studio, and I went into configure settings and got Android versions Jellybean on up, and got the platform tools, build tools, and the usb driver. I try to put the file in Unity and when I run it, it says cannot find SD$$anonymous$$ or something like that, pretty much the SD$$anonymous$$ file wasn't working. Can you please help me get it? Thanks.

avatar image lspence812 · Jan 02, 2018 at 10:17 PM 0
Share

You don't need Android Studio. Just download the SD$$anonymous$$ and then within Unity browse to the location you installed the SD$$anonymous$$ to.

SD$$anonymous$$ Command line Tools. Scroll to the bottom of the page.

https://developer.android.com/studio/index.html

avatar image Carson365 · Jan 02, 2018 at 10:29 PM 0
Share

It didn't quite work... I downloaded the command line and I extracted it and put the tools folder in Unity. It says "Unable to update the SD$$anonymous$$. Please run the $$anonymous$$anager manually to make sure you have the latest set of tools..." I'm pretty sure to do that, you need to Open the Android.bat file, but it doesn't work. People say it just doesn't work anymore, so I probably need a new way. Any suggestions? Thanks. @Ispence812

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

173 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

Related Questions

Android sdk build error 10 Answers

GoogleVR vs GearVR - frame dropping 0 Answers

How can add Android 6.0 on my API Level ( I have all my sdk installed up until Android 7.0 Nougat) 1 Answer

Failed to re-package resources 1 Answer

Please help with 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