1. Download our Official Android App: Forums for Android!

Android Studio fails to transfer and run "hello world"

Discussion in 'Android Development' started by DrMN, Sep 12, 2017.

  1. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    New installation of Android Studio, build the basic activity per the andriod developer tutorial, click "run -> run..", choose the device. The app is build, but the transfer to the device does not happen.
     

    Advertisement

  2. LV426

    LV426 Illegitimi non carborundum
    Moderator
    Rank:
     #21
    Points:
    1,238
    Posts:
    4,831
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    4,831
    6,315
    1,238
    Male
    Software developer
    South West of England
    It may have crashed. What's shown in the Logcat view?
     
  3. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    Amazingly, it just now worked. I have not a clue as to why now, nor why not before.

    The nextablet was plugged in before starting the app, and it was asleep. I woke it up at some point after clicking go. That last detail is the only thing that I did not try previously, it was always awake at the beginning of previous attempts. If that is the magic step, then it is still quite bizarre.

    I do not see any thing called "Logcat view"

    The development host is Fedora 26, with Android Studio 2.3, and a Nextablet NXA8QC116
     
  4. LV426

    LV426 Illegitimi non carborundum
    Moderator
    Rank:
     #21
    Points:
    1,238
    Posts:
    4,831
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    4,831
    6,315
    1,238
    Male
    Software developer
    South West of England
    Well great that you got it working, but if you want to be an effective app developer, get familiar with the Logcat. It's the main output view for debugging and displaying stack traces.
     
  5. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    How is it accessed? It doesn't seem to appear on its own, and there is no menu item with that label. Also, is there a facility for single stepping and showing variable or memory contents? Sorry to cross the RTFM line, so far the documentation and ide dont seem to completely line up.
     
  6. LV426

    LV426 Illegitimi non carborundum
    Moderator
    Rank:
     #21
    Points:
    1,238
    Posts:
    4,831
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    4,831
    6,315
    1,238
    Male
    Software developer
    South West of England
  7. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    Yes, I saw that, and the tutorials as well. Thank you
     
  8. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    Got it!! It seems that the IDE wants to be run with the default set to my home directory. In other words, login, or cd <return> to the home directory, then # android-studio/bin/studio.sh, Does that make sense?

    I found the logcat display also, google search directed me to the "Android Monitor" tab. So now we're cookin'. Thank you.
     
    LV426 likes this.
  9. LV426

    LV426 Illegitimi non carborundum
    Moderator
    Rank:
     #21
    Points:
    1,238
    Posts:
    4,831
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    4,831
    6,315
    1,238
    Male
    Software developer
    South West of England
    Odd. The startup script shouldn't care where your current working directory is.
    Try adding the Android Studio bin dir to your PATH

    # PATH=$PATH:~/android-studio/bin
    # studio.sh

    then it doesn't matter where you currently are in the filesystem, AS should always start.
     
  10. DrMN

    DrMN Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    6
    Joined:
    Sep 12, 2017

    Sep 12, 2017
    6
    1
    16
    I will try that.

    Before downloading and installing android-studio, I installed android-tools from the fedora repository. Is that a conflict?
     
  11. LV426

    LV426 Illegitimi non carborundum
    Moderator
    Rank:
     #21
    Points:
    1,238
    Posts:
    4,831
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    4,831
    6,315
    1,238
    Male
    Software developer
    South West of England
    I'm not sure what android-tools includes, but on my Ubuntu system I needed nothing more than what I downloaded from the official Android Studio download site.
     

Share This Page

Loading...