Search Unity

build and run not working

Discussion in 'Android' started by alexchandriyaa, Jun 14, 2018.

  1. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    while using build and run option getting this error i can take apk using build option Capture.PNG

    unity version : 2017.4.2f2
    android sdk version : 27.0.2
     
  2. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    can you build (without the "and run")
    do you have the unity app?
    is it running when you build and run?
    have you selected "any android device connected" somewhere in the settings?(not sure where anymore, I just know what to look for)

    if nothing else works, save everything, close everything down, open unity on android, then open your project
    try again
     
  3. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    i can take build but build and run is not working, will try opening the project in android and tell
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you run "adb devices" in a command prompt?
     
  5. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    no i didnt check that can you say how to check??
     
  6. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    connect your phone to your computer with usb
    open up your command prompt
    cd to wherever your sdk is
    type "adb devices"
     
  7. Papapizza

    Papapizza

    Joined:
    Jul 6, 2018
    Posts:
    1
    Up! I've the same issue since I upgrade Unity and the sdk
     
  8. alexchandriyaa

    alexchandriyaa

    Joined:
    Jan 18, 2017
    Posts:
    140
    i upgraded but didnt work
     
  9. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    I'm seeing the same issue. Unity editor is able to see my connected device. An apk is built but the editor is failing to deploy to the device.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What does "adb devices" return? For me, it's located where I installed my AndroidSDK under /platform-tools/adb.exe
     
  11. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    It returns the list of devices attached (which is only 1 device). Same install location as you.
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Great! How about "adb install myfile.apk" ?
     
  13. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    That command installed the apk with no issues.
     
  14. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    The problem is that my USB connected device is still not registering with the Unity Profiler. Using the 'Build and Run' option has worked for me in the past.
     
  15. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    Any additional info on the 'Build and Run' issue?
     
  16. bongsau

    bongsau

    Joined:
    Jan 19, 2017
    Posts:
    6
    Fixed my issue by uninstalling and reinstalling the same Unity Version
     
  17. Schalll

    Schalll

    Joined:
    Oct 28, 2016
    Posts:
    1