A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)



 
 
Thread Tools Display Modes
  #16  
Old November 2nd 18, 04:33 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Wed, 31 Oct 2018 10:54:30 +0000, Bill wrote:

hence my interest in trying to learn
about Android. I should have time to do and learn something, but there
are long periods when life gets in the way.


Hi Bill,
We're in the same boat, give or take, just on opposite sides of the pond.

Do you have a tablet?
o Is it Android (then it will be easy to use to get the tutorial videos)
o Or, is it iOS (like mine is, which means everything is a _lot_ harder)

Or, can you put two monitors side by side, from two different desktops?

If you have a tablet, you can download the 8 sets of tutorial videos onto
that tablet using the youtube-dl.exe Windows freeware (plus ffmpeg & C++
freeware).

For example, what I'm doing now, since my monitor is downright puny, is I
will download all those videos, en masse, and then boot momentarily to
Ubuntu 18.04, which allows me to slide the videos over to the iPad which
mounts read/write on Ubuntu essentially as a USB drive. (If your tablet is
Android, you won't have to deal with that issue of turning the iPad into a
read/write USB drive as Android already acts like a read/write USB drive
when connected to Windows).

The process for installing youtube-dl.exe is a bit complex, unfortunately:
1. Install Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-US/download/details.aspx?id=5555
2. Upate Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update
https://www.microsoft.com/en-us/download/details.aspx?id=26999
3. Get ffmpeg
http://ffmpeg.zeranoe.com/builds/
Put the three executables in the same directory as the youtube-dl.exe
ffmpeg.exe
ffplay.exe
ffprobe.exe
4. Then get the right youtube-dl.exe that uses Visual C & not python!
https://youtube-dl.org/
http://rg3.github.io/youtube-dl/download.html
5. Then download a video as an OPUS file:
youtube-dl.exe http://any_url.com
6. Download a video as an MP4 file:
youtube-dl.exe -f 18 http://any_url.com
7. Download and extract just the audio as an M4A:
youtube-dl.exe -f 140 http://any_url.com
8. Download and extract just the audio as an MP3:
youtube-dl.exe -x --audio-format mp3 --audio-quality 0 http://any_ourl.com
9. Download the videos in a playlist text file:
youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a playlist.txt
Where that playlist is a line-by-line set of URLs as shown below.
10. To download the 8 tutorials, you can run this freeware command:
C:\ mkdir c:\tmp\android\video
C:\ cd c:\tmp\android\video
C:\ youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a download.txt
Where the "download.txt" file is the following set of 8 tutorials:
#
https://youtu.be/_418iSKJuOk
#
https://youtu.be/EOfCEhWq8sg
#
https://youtu.be/LN8fBh7LH9k
https://youtu.be/u5Gj-_ifxUo
https://youtu.be/axwFF4oSDi8
https://youtu.be/ASzpxZ504Es
https://youtu.be/GR_JtJWzh4Y
#
https://youtu.be/dFlPARW5IX8
https://youtu.be/6ow3L39Wxmg
https://youtu.be/rdGpT1pIJlw
https://youtu.be/bu5Y3uZ6LLM
#
https://youtu.be/agk01JKps8w
https://youtu.be/NSoFTHDHY40
https://youtu.be/fFzpWuHGyhc
https://youtu.be/gSRKhxuXTw4
https://youtu.be/g3jPYU9wCKg
https://youtu.be/G4SJFk8PdAc
https://youtu.be/e_Xe4sTWxTw
https://youtu.be/qS9rZV-Qbpk
https://youtu.be/8IZfYuTbCnY
https://youtu.be/A6YE5jadnGo
https://youtu.be/YeR2y3HdO1Q
https://youtu.be/z87fVhI4Yt0
https://youtu.be/xIwFd-u6yKw
https://youtu.be/wHA0AnURQ_M
https://youtu.be/nYqxyfKOXBw
#
https://youtu.be/oEgpGv2CF1U
#
https://youtu.be/mAJeK283j0I
#
https://youtu.be/-igAiudpBng
#

The reason for this effort is twofold:
o My monitor is too small to handle the videos & the IDE
o The videos show you what buttons to hit (the text tutorials don't)

If someone here has _experience_ in _learning_ Android, that would help,
where I've pretty much given up on the _text_ tutorials because I find I
spend ten seconds reading what to do, and then ten minutes searching for
the buttons they told us to hit.

The video tutorials at least show every button; but you have to be able to
start and stop them constantly, which is why it's handy to have them on the
iPad.

As you may be aware, everything sucks on iOS compared to Android, so if you
have an Android tablet, you can easily just download _any_ video you want
using NewPipe freeware on Android, which works _perfectly_.
https://f-droid.org/en/packages/org.schabi.newpipe/

If you're on iOS, like I am, then everything sucks compared to Android,
when it comes to flexibility, power, functionality, and usefulness. Sigh.
Ads
  #17  
Old November 2nd 18, 07:29 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Thu, 1 Nov 2018 23:44:10 -0000 (UTC), Diesel wrote:

Bill already told you he had as well as HAXM, etc. [g])
for what reason, then?


Woo hoo!

This is for Bill, where my first app (named "app01") was the
"Hello World" app from the Android text tutorial, but where
I was finding that I was taking 10 seconds to read an
instruction but then 10 minutes to find the button they
said to hit (since the text tutorial didn't _show_ the
buttons well).
https://developer.android.com/training/basics/firstapp/

My second app (named "app02") went a _lot_ smoother!

If Bill (or Diesel, or anyone else who is a noob but who
wants to write Android apps using freeware) wants to follow
along, here is my running log file of app02, which worked
after I realized that the older Android Studio used in the
tutorial had a very slight syntax differnece with the new
Android Studio, which caused a "compiler error".
================================================== ========================
app02.log
================================================== ==========================
Screenshots:
http://www.bild.me/bild.php?file=9813868app02.gif
http://www.bild.me/bild.php?file=1608334app02a.gif
http://www.bild.me/bild.php?file=9175315app02b.gif
================================================== ==========================
Following this video:
d) Android Studio For Beginners Part 1, 2, 3, 4
by Bill Butterfield, Published on Jun 13, 2017 (mp4)
(It's a slightly older version of Android Studio.)
(You build a basic calculator adding app.)
https://youtu.be/dFlPARW5IX8 (part 1)
https://youtu.be/6ow3L39Wxmg (part 2)
https://youtu.be/rdGpT1pIJlw (part 3)
https://youtu.be/bu5Y3uZ6LLM (part 4)
================================================== ==========================
This is what we accomplished in the first video above:
https://youtu.be/dFlPARW5IX8 (part 1)
a. Set up an Android Studio Project
b. Create a simple calculator app that added two integer numbers
c. Debugging step by step through the code
================================================== ==========================
CHANGEFROM:
================================================== ==========================
package com.app2company.app02;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
================================================== ==========================
Note that the tutorial uses 'view' but the Android Studio uses 'v'.
Tutorial: public void onClick(View view) {
AndroidStudio: public void onClick(View v) {
This alone seems to have caused a compiler error, which complained about
a missing semicolon (, but where there was no missing semicolon. Go figure.
================================================== ==========================
CHANGETO:
================================================== ==========================
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Button addBtn = (Button) findViewById(R.id.addBtn);
addBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText firstNumEditText = (EditText) findViewById(R.id.firstNumEditText);
EditText secondNumEditText = (EditText) findViewById(R.id.secondNumEditText);
TextView resultTextView = (TextView) findViewById(R.id.resultTextView);

int num1 = Integer.parseInt(firstNumEditText.getText().toStri ng());
int num2 = Integer.parseInt(secondNumEditText.getText().toStr ing());
int result = num1 + num2;
resultTextView.setText(result + "");
}
});

}
}
================================================== ==========================
Screenshots:
http://www.bild.me/bild.php?file=9813868app02.gif
http://www.bild.me/bild.php?file=1608334app02a.gif
http://www.bild.me/bild.php?file=9175315app02b.gif
================================================== ==========================


  #18  
Old November 2nd 18, 09:03 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Diesel
external usenet poster
 
Posts: 937
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

Bill
Wed, 31 Oct 2018 10:54:30
GMT in alt.comp.freeware, wrote:

In message , Arlen Holder
writes
If we can work together on something like this, or if others have
a suggestion, it would be nice to get a handful of interested
folks to pick a SIMPLE action (like ring a bell) and then work
together toward that goal.

That would make Usenet very useful, don't you think?


I have, in the past, worked with other people, but usually via
email. It would be interesting to see if this could work on
usenet. If we did this, I think the cross-posting might be a
problem. I am only on comp.mobile.android.


I've recently subbed to that newsgroup myself, Bill. You may want to
take a lurking peek inside some of the other threads Arlen has taken
the time to create there and here (alt.comp.freeware) before
continuing with this too much further.

You too will be his best friend, (read:useful idiot), until you
invariably wind up writing something they don't like. Then, it's
moron, and stupid for you. As it was with several others, including
myself. No need to take my word for any of this mind you, browse the
comp.mobile.android newsgroup a bit and see for yourself.

Just passing along some friendly intended advice. Do with it what you
will.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit he
https://tekrider.net/pages/david-brooks-stalker.php
================================================== =
Anarchy: Such a good idea, it should be the law.
  #19  
Old November 2nd 18, 09:03 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Diesel
external usenet poster
 
Posts: 937
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

Arlen_Holder
news alt.comp.freeware, wrote:

On Thu, 1 Nov 2018 23:44:10 -0000 (UTC), Diesel wrote:

Bill already told you he had as well as HAXM, etc. [g])
for what reason, then?


Woo hoo!

This is for Bill, where my first app (named "app01") was the
"Hello World" app from the Android text tutorial, but where
I was finding that I was taking 10 seconds to read an
instruction but then 10 minutes to find the button they
said to hit (since the text tutorial didn't _show_ the
buttons well).
https://developer.android.com/training/basics/firstapp/

My second app (named "app02") went a _lot_ smoother!

If Bill (or Diesel, or anyone else who is a noob but who
wants to write Android apps using freeware) wants to follow
along, here is my running log file of app02, which worked
after I realized that the older Android Studio used in the
tutorial had a very slight syntax differnece with the new
Android Studio, which caused a "compiler error".


a noob at what specifically? Writing code for Android, specifically
or writing code in general? You'd be wrong on both counts... big
****ing grin; Remember when I told you freeware existed to do what
you wanted? I might not have mentioned I may have written something
for the task and might have shared the apk with you, and entire
source code for that matter; had you not been a prick towards me.

You only stated it had to be freeware; you didn't say any of it
couldn't be home brew. ROFL!

And no, I wasn't trying to trick you; only one of the solutions I
know of to get those drive letters you want is of my own doing. The
others (except for one) are freeware written by other people.
Sometimes, an entire team of programmers.

Btw, I did try to get the app on google play; for reason(s) unknown
and not clearly explained to me, it wasn't approved. It contains no
adware, spyware, nothing of the sort, but, wasn't allowed. Maybe I
violated some rule with the way in which I got access to the device?
Like I said, google wasn't forthcoming with any real explanation.


Is there a specific reason you're responding to my replies but
addressing Bill rather than me? And why do you still refer to me as a
noob when it's clear as day that you're the only n00b in the thread?

--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit he
https://tekrider.net/pages/david-brooks-stalker.php
================================================== =
If you consider television dangerous but routinely carry explosives
in your clothing, you may be a Muslim.
  #20  
Old November 2nd 18, 08:51 PM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Bill[_40_]
external usenet poster
 
Posts: 346
Default Report: My first "hello world" using Android Studio freeware onWindows worked just fine (in about an hour)

On 02/11/2018 03:33, Arlen_Holder wrote:
On Wed, 31 Oct 2018 10:54:30 +0000, Bill wrote:

hence my interest in trying to learn
about Android. I should have time to do and learn something, but there
are long periods when life gets in the way.


Hi Bill,
We're in the same boat, give or take, just on opposite sides of the pond.

Do you have a tablet?
o Is it Android (then it will be easy to use to get the tutorial videos)
o Or, is it iOS (like mine is, which means everything is a _lot_ harder)

Or, can you put two monitors side by side, from two different desktops?

If you have a tablet, you can download the 8 sets of tutorial videos onto
that tablet using the youtube-dl.exe Windows freeware (plus ffmpeg & C++
freeware).

For example, what I'm doing now, since my monitor is downright puny, is I
will download all those videos, en masse, and then boot momentarily to
Ubuntu 18.04, which allows me to slide the videos over to the iPad which
mounts read/write on Ubuntu essentially as a USB drive. (If your tablet is
Android, you won't have to deal with that issue of turning the iPad into a
read/write USB drive as Android already acts like a read/write USB drive
when connected to Windows).

The process for installing youtube-dl.exe is a bit complex, unfortunately:
1. Install Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-US/download/details.aspx?id=5555
2. Upate Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update
https://www.microsoft.com/en-us/download/details.aspx?id=26999
3. Get ffmpeg
http://ffmpeg.zeranoe.com/builds/
Put the three executables in the same directory as the youtube-dl.exe
ffmpeg.exe
ffplay.exe
ffprobe.exe
4. Then get the right youtube-dl.exe that uses Visual C & not python!
https://youtube-dl.org/
http://rg3.github.io/youtube-dl/download.html
5. Then download a video as an OPUS file:
youtube-dl.exe http://any_url.com
6. Download a video as an MP4 file:
youtube-dl.exe -f 18 http://any_url.com
7. Download and extract just the audio as an M4A:
youtube-dl.exe -f 140 http://any_url.com
8. Download and extract just the audio as an MP3:
youtube-dl.exe -x --audio-format mp3 --audio-quality 0 http://any_ourl.com
9. Download the videos in a playlist text file:
youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a playlist.txt
Where that playlist is a line-by-line set of URLs as shown below.
10. To download the 8 tutorials, you can run this freeware command:
C:\ mkdir c:\tmp\android\video
C:\ cd c:\tmp\android\video
C:\ youtube-dl.exe -ciwo "%(title)s.%(ext)s" -a download.txt
Where the "download.txt" file is the following set of 8 tutorials:
#
https://youtu.be/_418iSKJuOk
#
https://youtu.be/EOfCEhWq8sg
#
https://youtu.be/LN8fBh7LH9k
https://youtu.be/u5Gj-_ifxUo
https://youtu.be/axwFF4oSDi8
https://youtu.be/ASzpxZ504Es
https://youtu.be/GR_JtJWzh4Y
#
https://youtu.be/dFlPARW5IX8
https://youtu.be/6ow3L39Wxmg
https://youtu.be/rdGpT1pIJlw
https://youtu.be/bu5Y3uZ6LLM
#
https://youtu.be/agk01JKps8w
https://youtu.be/NSoFTHDHY40
https://youtu.be/fFzpWuHGyhc
https://youtu.be/gSRKhxuXTw4
https://youtu.be/g3jPYU9wCKg
https://youtu.be/G4SJFk8PdAc
https://youtu.be/e_Xe4sTWxTw
https://youtu.be/qS9rZV-Qbpk
https://youtu.be/8IZfYuTbCnY
https://youtu.be/A6YE5jadnGo
https://youtu.be/YeR2y3HdO1Q
https://youtu.be/z87fVhI4Yt0
https://youtu.be/xIwFd-u6yKw
https://youtu.be/wHA0AnURQ_M
https://youtu.be/nYqxyfKOXBw
#
https://youtu.be/oEgpGv2CF1U
#
https://youtu.be/mAJeK283j0I
#
https://youtu.be/-igAiudpBng
#

The reason for this effort is twofold:
o My monitor is too small to handle the videos & the IDE
o The videos show you what buttons to hit (the text tutorials don't)

If someone here has _experience_ in _learning_ Android, that would help,
where I've pretty much given up on the _text_ tutorials because I find I
spend ten seconds reading what to do, and then ten minutes searching for
the buttons they told us to hit.

The video tutorials at least show every button; but you have to be able to
start and stop them constantly, which is why it's handy to have them on the
iPad.

As you may be aware, everything sucks on iOS compared to Android, so if you
have an Android tablet, you can easily just download _any_ video you want
using NewPipe freeware on Android, which works _perfectly_.
https://f-droid.org/en/packages/org.schabi.newpipe/

If you're on iOS, like I am, then everything sucks compared to Android,
when it comes to flexibility, power, functionality, and usefulness. Sigh.


Hi Arlen,

I'm replying without quoting for space reasons, so hope this makes sense.

I am using 2 Windows laptops, side by side. The X201 (W10) has the
development system running, the X220T (W7) is there to run text and/or
videos. The latter is a tablet-convertible laptop, so can be folded to
just take the space of the screen. Both have 12" screens, and this seems
to work OK.

I do have a 7" Android tablet and a 10" Windows 8 tablet, but they are
too small, so I think I'll stick with the Lenovo X-series.

I totally agree about the text guide and wasting time searching for
buttons. I had already been looking up and at some videos - specifically
the Bill Butterfield ones, but decided to plough on until I get the
first text based one working. Your list of videos will be a great help,
and I can download them. I am an Apple-free zone.

Now to the problem! I have now got the button and text box sitting
there. It worked on the second try. So it's on to Java, where I start
with a blank mind.


This is what I start with, which works:
--------------------------------------------------
package com.example.my1stapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import static android.icu.lang.UCharacter.GraphemeClusterBreak.V ;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
-------------------------------------------------

and this is what I am told to do:


-------------------------------------------------

In the file app java com.example.myfirstapp MainActivity, add the
sendMessage() method stub as shown below:


class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}

/** Called when the user taps the Send button */
fun sendMessage(view: View) {
// Do something in response to button
}
}

-----------------------------------------------

If I just append the second bunch of code to the bottom of the first
block, the whole of the second block is just underlined in red squiggle,
which I assume implies an error.

I tried commenting out the curly bracket at the end of the first code
block and adding one at the bottom of the second. This reduced the red
squiggle count, but hovering over almost every word shows an error.

I've dug out an old Java book and done a search for Java basics on the
'net, but without success so far. The Usenet Java group I've looked at
seemed to die in 2012.
It seems to me that I need to have a basic grasp of Java whatever
tutorial I follow, and this seems like a very basic stumbling block.






--
Bill

---
This email has been checked for viruses by AVG.
https://www.avg.com

  #21  
Old November 2nd 18, 09:07 PM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Bill[_40_]
external usenet poster
 
Posts: 346
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

OOops, sorry, forgot to delete the quote. :-(
--
Bill

---
This email has been checked for viruses by AVG.
https://www.avg.com

  #22  
Old November 2nd 18, 11:01 PM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Fri, 2 Nov 2018 08:03:33 -0000 (UTC), Diesel wrote:

Btw, I did try to get the app on google play; for reason(s) unknown
and not clearly explained to me, it wasn't approved. It contains no
adware, spyware, nothing of the sort, but, wasn't allowed. Maybe I
violated some rule with the way in which I got access to the device?
Like I said, google wasn't forthcoming with any real explanation.


Hi Diesel,
What is the trick to get Android Studio to _use_ the MS Android Emulator?

Thanks for your helpful advice, Diesel, where I'll return the favor by
letting folks know that _before_ they install the Android Studio IDE,
they need to consider whether they're on an Intel or AMD CPU.
o If they're on Intel, the HAXM emulation will likely work for them
o If they're on AMD, the HAXM defaults will prevent emulation from working

If they are on an Intel CPU, these two URLs will help them out:
o Installation instructions for installing HAXM on Windows
o https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows
o Download software for Intel Hardware Accelerated Execution Manager
o https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm

If they're on AMD, like I am, there are AVD decisions to be made, where I
suggest that they not check the AVD box when installing Android Studio:
o [x]Android Studio
o [_]Android Virtual Device
Where I suggest they install an AMD-compatible Android emulator separately.
================================================== ==========================
The Android emulator "booted" up, standalone, on Windows with the AMD CPU!
http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg
================================================== ==========================
I'm not sure how to get Android Studio to output _to_ that emulator though!
I've hit a hundred buttons in Android Studio, but Android Studio still
won't download the app to the Android emulator yet.

*What's the trick to get Android Studio to _use_ the MS Android Emulator?*
http://www.bild.me/bild.php?file=3799337amd_emulation_01.jpg
http://www.bild.me/bild.php?file=5017616amd_emulation_02.jpg
http://www.bild.me/bild.php?file=8615530amd_emulation_03.jpg
http://www.bild.me/bild.php?file=9950110amd_emulation_04.jpg
http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg
================================================== ==========================
AMD owners can use the Microsoft Visual Studio Emulator for Android stub:
o https://visualstudio.microsoft.com/vs/msft-android-emulator/

Microsoft documentation (from 2014) is he
o Introducing Visual Studio¢s Emulator for Android
o https://blogs.msdn.microsoft.com/devops/2014/11/12/introducing-visual-studios-emulator-for-android/

Which says, about Hyper-V...
o Conflict with Hyper-V on Windows.
o Many emulators require you to disable Hyper-V
o Or they don¢t work as well with Hyper-V as they do without Hyper-V
o Using Hyper-V is part of the setup for many developer activities
o Restarting (multiple times a day) to toggle Hyper-V is not acceptable

It says, about ADB...
o The emulator is ADB-connected
o So it also works well with your Android Studio projects
o See: Using Visual Studio Emulator for Android from Android Studio
o https://blogs.msdn.microsoft.com/devops/2015/07/20/using-the-visual-studio-emulator-for-android-from-android-studio-or-eclipse-with-adt/
o Which says:
o We¢ve made the Visual Studio Emulator for Android available
without needing to also download Visual Studio.
o By default, Android Studio will want to debug to the slow Android SDK emulator.
o You can configure Android Studio to allow you to select a target
a. In Android Studio,
b. Run Edit Configurations Defaults / Android Application
c. Set Target Device to Show chooser dialog
d. Check Use same device for future launches
... then nothing makes sense because the doc doesn't match the reality ...
================================================== ==========================
The MS stub is extremely dumb, in that it doesn't ask where to be put.
You know you will have problems the moment you see programs _this_ dumb!

The stupid MS program installer is so utterly dumb that there was no indication
whatsoever _where_ it put itself, but rooting around found changes inside:
o C:\ProgramData\Package Cache (234MB in 17 directories)
o C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android (183 MB)
o C:\Program Files (x86)\Microsoft Emulator Manager (1MB)
o C:\Program Files (x86)\Microsoft XDE (30MB)

I hate when stupid programs pollute the nice clean neighborhood like this
where they defy any attempt to control them (like a pack of rabid dogs).

You're going to *need* those paths though, since Android Studio can't find
that emulator unless and until you tell Android Studio where to find it!
================================================== ==========================
When installing, the stub will download from the net
Microsoft Visual Studio Emulator for Android API 19 Platform
================================================== ==========================
There is documentation on setting up the Hyper-V on Windows 10:
o https://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/introducing-visual-studio-s-emulator-for-android.aspx
================================================== ==========================
At this point, I wiped out Android Studio, & all user settings, & started over.
(This has to be the 20th time I've had to wipe out Android Studio. Sigh.)
o First I installed the Microsoft Visual Studio Editor for Android
o Then I installed Android Studio sans the AVD option checked
o Android Studio went into C:\app\editor\android\studio\.
================================================== ==========================
There were no projects in C:\tmp\android (since I wiped them out).
So in the Android Studio version 3.2.1 GUI at the bottom left, I made
this one setting change (which is unrelated to the AVD setup):
o Configure Project defaults Settings Auto Import
o [x]Add unambiguous imports on the fly
o [x]Optimize imports on the fly (for current project)
================================================== ==========================
This isn't related to the AVD setup:
o Configure SDK Manager Appearance & Behavior System Settings
Android SDK Android SDK Location: C:\app\hardware\android\sdk
(I need to move that, later, to the C:\app\editor\android\sdk location.)
o Configure Project Defaults Project Structure
Android SDK location:C:\app\hardware\android\sdk
JDK location: C:\app\editor\android\studio\jre [x]Use embedded JDK (recommended)
Android NDK location: (empty) More info he https://developer.android.com/ndk/
================================================== ==========================
This is related to the AVD setup:
o Configure Project Defaults Run Configurations Defaults
Android App General Depoloyment Target Options
Open Select Deployment Target Dialog
[x]Use same device for future launches
This will prompt you to select an ADB-connected device when you debug the
first time, then remember that device for subsequent debugging sessions.
================================================== ==========================
This is related to the AVD setup:
o C:\Users\x\Desktopemulatorcmd.exe /sku:Android list /type:device
Identifier | Name | Version
-------------------------------------+------------------------------+------------
226C76AC-9E9A-4EBD-A495-79E8C5C5292F | 7" KitKat (4.4) XHDPI Tablet | 1.0.60404.1
363F7AED-462C-46BD-9FEC-F1DD3B79916C | 5" KitKat (4.4) XXHDPI Phone | 1.0.60404.1
================================================== ==========================
o Configure Settings Tools External Tools (click the green "+" sign)
Name: MS Android Emulator Group: External Tools
Description: Quick Launch 4.4 XXHDPI Phone
Tool Settings:
Program: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe
Arguments: /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Working directory: C:\Program Files (x86)\Microsoft Emulator Manager\1.0
Show in: [x]Main menu [x]Editor menu [x]Project views [x]Search result

Advanced Options
[x]Synchronize files after execution
[x]Open console for tool output
[_]Make console active on message in stdout
[_]Make console active on message in stderr
================================================== ==========================
At this point I wanted to customize the menus to add it, but I needed to
"Create an Android Project" first, I guess, in order to get the main toolbar.

Start a new Android Project
o Application name: My Application (change to: app00)
o Company domain: ap00.com (notice the single "p")
o Project location: c:\tmp\android\app00

Hmmm.... the Microsoft Android emulator didn't work...
================================================== ==========================
After pressing "Run", I get this in the Android Studio IDE:
Select Deployment Target Connected Devices LGTP45071afb6a4
[UNAUTHORIZED - Press OK in the 'Allow USB Debugging' dialog on your device.]
On the phone, it says:
Allow USB Debugging?
The computer's RSA key fingerprint is:
AF:F9:F4:2B:BB:45:A3:4F:BC:AF3:BFD:5E:22:AA
[_]Always allow from this computer
[Cancel][OK]
================================================== ==========================
Even after pressing "Run" a few times and setting up "emulation" devices,
it still didn't work, so I don't remember all the buttons I pressed by now.
================================================== ==========================
At some point, I tried the following...

Android Studio: Tools AVD Manager Create Virtual Device
Category Phone Import Hardware Profiles Select path:
C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0\Default\Devices\5_KitKat_(4.4)_XXHDPI_ Phone.cfg
OK
The only "Select a system image" that works is "Pie".
But that failed miserably ... (same emulation error as always).
Sigh.
================================================== ==========================
Then, I tried the following...
Android Studio: Tools External Tools MS Android Emulator
That put a Run windows on the bottom, saying:
"C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe" /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Validating emulator arguments...
Determining if emulator is already running...
Preparing virtual machine...
You were previously added to the Hyper-V Administrators security group, but the permissions have not taken effect. Please sign out of your computer for the permissions to take effect.

Process finished with exit code 5
================================================== ==========================
Hmmm.... OK. I guess I'll sign out of Windows and sign back in I guess.
I didn't exit out of Android Studio before signing out so I restarted
Android Studio when I signed back into Windows.
================================================== ==========================
Android Studio: Tools External Tools MS Android Emulator
That put a Run windows on the bottom, saying:
"C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe" /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
Validating emulator arguments...
Determining if emulator is already running...
Preparing virtual machine...

Up pops a dialog:
Visual Studio Emulator for Android
Click "Retry" to run the emulator in elevated mode.
You do not have permission to modify internal Hyper-V network adapter
settings, which are required to run the emulator.
[Retry][Close]

I hit the "Run" at the very bottom left of Android Studio
(which I had never seen or hit before)

Woo hoo!
The Android emulator "booted" up, standalone, on Windows with the AMD CPU!
http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg
================================================== ==========================
I'm not sure how to get Android Studio to output _to_ that emulator though!
I've hit a hundred buttons in Android Studio, but Android Studio still
won't download the app to the Android emulator yet.

*What's the trick to get Android Studio to _use_ the MS Android Emulator?*
http://www.bild.me/bild.php?file=3799337amd_emulation_01.jpg
http://www.bild.me/bild.php?file=5017616amd_emulation_02.jpg
http://www.bild.me/bild.php?file=8615530amd_emulation_03.jpg
http://www.bild.me/bild.php?file=9950110amd_emulation_04.jpg
http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg
================================================== ==========================
Diesel,
Do you know the trick to get Android Studio to _use_ that MS Android Emulator?
  #23  
Old November 3rd 18, 12:16 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Fri, 2 Nov 2018 19:51:07 +0000, Bill wrote:

I'm replying without quoting for space reasons, so hope this makes sense.


Hi Bill,
I've been on Usenet for decades where I never understood why people quote
so much since it's _all_ already there in the post that they're responding
to.

With me, you can quote _just_ the 1 or 1/2 sentence you're responding to!


I am using 2 Windows laptops, side by side.

Good for you! That makes it easier for you than for me to
o Follow instructions (which take up an entire screen), and,
o At the same time, perform actions (which also take up an entire screen).

o The X201 (W10) has the
development system running, the X220T (W7) is there to run text and/or
videos. The latter is a tablet-convertible laptop, so can be folded to
just take the space of the screen. Both have 12" screens, and this seems
to work OK.


Since the second machine is Windows, you won't have the horror of what I
have to go through to get videos onto the iPad. Lucky you. The three videos
I plan on doing are these three, where I ditched a bunch of other videos in
favor of this guy, where the only (slight) problem is that his Android
Studio is slightly older than ours (so some buttons moved a bit).
o https://youtu.be/dFlPARW5IX8 (I've done this - and I think it's great)
o https://youtu.be/6ow3L39Wxmg (This is the one I plan on doing next)
o https://youtu.be/rdGpT1pIJlw (Then I plan on doing this one after that)
o https://youtu.be/bu5Y3uZ6LLM (Don't bother with this as it's too deep)

I do have a 7" Android tablet and a 10" Windows 8 tablet, but they are
too small, so I think I'll stick with the Lenovo X-series.


Good for you. My iPad is the $300 Costco 9.7-inch WiFi-only iPad from 2017.
It's pretty small for my tired old eyes - but - it's better than nothing.

I totally agree about the text guide and wasting time searching for
buttons.


Yup.
I've learned what you learned, but only after running through the original
text tutorial that it sucks becasue I can't find the buttons it says to hit
https://developer.android.com/training/basics/firstapp/

*In hindsight, I recommend noobs _start_ with the _video_ tutorials first!*

I'm sure _after_ I'm familiar with all the billions of buttons in Android
Studio, that the tutorial above will work great - but it sucks - IMHO - for
a noob simply because they don't show a graphic with an arrow to the
buttons they say to hit.

I had already been looking up and at some videos - specifically
the Bill Butterfield ones, but decided to plough on until I get the
first text based one working.


I gave up on the text-based tutorial (for now); I'll go back to it later.
For now, I'm doing the Bill Butterfield 3 of 4 videos.
I've only done the first one so far (as I spent today on trying to install
the Microsoft Android Emulator since I'm on an AMD CPU - which you don't
have to deal with):
o https://visualstudio.microsoft.com/vs/msft-android-emulator/

I have the Microsoft Android emulator working inside Android Studio:
o http://www.bild.me/bild.php?file=8562677amd_emulation_05.jpg
But I don't yet have Android Studio _using_ it for emulation!

Your list of videos will be a great help,
and I can download them.


The good news is that the videos, while a pain in a different way, at least
show EVERY click on the screen!

I am an Apple-free zone.


Lucky you!

I have Apple equipment because I help people use Apple products.
Except in marketing, compared to Windows/Linux/Android, iOS stinks.

A lot of people _think_ they have solutions that work cross platform, but
until they get their **** working on iOS, they don't know what cross
platofrm means!

That means, eventually, all my apps will also work on iOS; but that will
happen way later (if ever).
o What are the most fundamental basic apps that are (apparently) lacking on Android?
o https://groups.google.com/forum/#!topic/comp.mobile.android/SZk_fXWqg88

Now to the problem! I have now got the button and text box sitting
there. It worked on the second try. So it's on to Java, where I start
with a blank mind.


I don't know the "java" syntax yet - but it's extremely "syntactical"!
That's for sure!

I see you have a followup message, so I'll look at that.

We really should both be working the same tutorial if we want to help each
other ... so ... I guess what I should do, to help you, is go _back_ to the
original text tutorial - which I had abandoned in favor of the video
tutorials.
https://developer.android.com/training/basics/firstapp/

To be sure, is _that_ the tutorial you're working on currently?
  #24  
Old November 3rd 18, 01:03 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Bill[_40_]
external usenet poster
 
Posts: 346
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

In message , Arlen_Holder
writes
We really should both be working the same tutorial if we want to help
each other ... so ... I guess what I should do, to help you, is go
_back_ to the original text tutorial - which I had abandoned in favor
of the video tutorials.
https://developer.android.com/training/basics/firstapp/

To be sure, is _that_ the tutorial you're working on currently?


Yes, that's the one, and I'm at the page saying " Start another
activity".

I still haven't progressed any further. Searches still haven't helped
and I don't really want to embark on a full Java training course again.
I'm almost certainly doing something really stupid.

I'll have a go at following the Butterfield addition app video in the
next day or so.
--
Bill

---
This email has been checked for viruses by AVG.
https://www.avg.com

  #25  
Old November 3rd 18, 02:44 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Sat, 3 Nov 2018 00:03:03 +0000, Bill wrote:

Yes, that's the one, and I'm at the page saying " Start another
activity".


Thanks Bill,
(I wonder what "editor" people use to edit xml & java outside the IDE?)

I'm in California, so we're a half day (roughly) apart - where
neither of us is doing this full time ... I'm hitting it sporadically
- but I do plan on being successful with the first five or ten apps
(whatever they may be).

My ultimate goal, if I get there, would be
o free apps on Google Play and/or F-droid that do one thing well
o no ads, no servers, no funny games, no non-necessary permissions

I still haven't progressed any further. Searches still haven't helped
and I don't really want to embark on a full Java training course again.
I'm almost certainly doing something really stupid.


Since it's helpful if we both work on the same app, I'll go back to
that tutorial that you're working on, where I've blown away Android Studio
at least 20 times by now, so I will start at the beginning again.

I'll have a go at following the Butterfield addition app video in the
next day or so.


Be careful about the "v" versus "view" in the Butterfield video,
where his code uses "view" but the current Android Studio uses "v"
which gave me a misplaced semicolon error (which made no sense to me)
which I only found by stepping through the code, line by line
(which is a classic debugging tactic, of course).

If you do the Butterfield first video, here's the XML code
(which is the layout) and the java code (which is the guts)
that I found successful.
o C:\tmp\android\app02\app\src\main\java\com\app2com pany\app02\MainActivity.java
o C:\tmp\android\app02\app\src\main\res\layout\activ ity_main.xml
===== java =====
package com.app2company.app02;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

Button addBtn = (Button) findViewById(R.id.addBtn);
addBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText firstNumEditText = (EditText) findViewById(R.id.firstNumEditText);
EditText secondNumEditText = (EditText) findViewById(R.id.secondNumEditText);
TextView resultTextView = (TextView) findViewById(R.id.resultTextView);

int num1 = Integer.parseInt(firstNumEditText.getText().toStri ng());
int num2 = Integer.parseInt(secondNumEditText.getText().toStr ing());
int result = num1 + num2;
resultTextView.setText(result + "");
}
});

}
}

===== java =====
===== xml =====
?xml version="1.0" encoding="UTF-8"?

-android.support.constraint.ConstraintLayout tools:context=".MainActivity" android:layout_height="match_parent" android:layout_width="match_parent" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"

EditText android:layout_height="wrap_content" android:layout_width="wrap_content" tools:layout_editor_absoluteY="8dp" tools:layout_editor_absoluteX="85dp" android:inputType="textPersonName|number" android:hint="Enter a number" android:ems="10" android:id="@+id/firstNumEditText"/

EditText android:layout_height="wrap_content" android:layout_width="wrap_content" tools:layout_editor_absoluteX="85dp" android:inputType="textPersonName|number" android:hint="Enter another number" android:ems="10" android:id="@+id/secondNumEditText" app:layout_constraintTop_toBottomOf="@+id/firstNumEditText" android:layout_marginTop="8dp"/

Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/addBtn" app:layout_constraintTop_toBottomOf="@+id/secondNumEditText" android:layout_marginTop="144dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" android:text="Add"/

TextView android:layout_height="0dp" android:layout_width="wrap_content" android:id="@+id/resultTextView" app:layout_constraintTop_toBottomOf="@+id/addBtn" android:layout_marginTop="92dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" android:text="Result" android:textSize="48sp"/

/android.support.constraint.ConstraintLayout
===== xml =====

BTW, for Windows experts, what editor do you use for XML & Java code?
https://groups.google.com/forum/#!topic/alt.comp.freeware/FloSeAKJfUE
  #26  
Old November 3rd 18, 03:00 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Diesel
external usenet poster
 
Posts: 937
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

Arlen_Holder
news alt.comp.freeware, wrote:

Since the second machine is Windows, you won't have the horror of
what I have to go through to get videos onto the iPad.


What horrors? I just setup an ipad this afternoon to access one of
those linux networks I recently setup. I had to install a file
manager to access the samba shares. and the user has to copy the
video he or she wants to watch over to the ipad to view it, but,
otherwise, I didn't run across any horrors with the process.

I'm not a mac person either and didn't run into any serious issues
with that. Getting the printers available to it however is another
story, entirely. Apple certainly likes doing that aspect their own
way.


Yup.
I've learned what you learned, but only after running through the
original text tutorial that it sucks becasue I can't find the
buttons it says to hit
https://developer.android.com/training/basics/firstapp/


That may actually have something to do with your completely
unnecessary desire not to use default installation folders.

I'm sure _after_ I'm familiar with all the billions of buttons in
Android Studio, that the tutorial above will work great - but it
sucks - IMHO - for a noob simply because they don't show a graphic
with an arrow to the buttons they say to hit.


You shouldn't be having such trouble and require that level of hand
holding, Arlen. How do you expect to become proficient at programming
or scripting if you have trouble following text based instructions or
video instructions that don't have pics available for your review for
every step?

I gave up on the text-based tutorial (for now); I'll go back to it
later. For now, I'm doing the Bill Butterfield 3 of 4 videos.
I've only done the first one so far (as I spent today on trying to
install the Microsoft Android Emulator since I'm on an AMD CPU -
which you don't have to deal with):
o https://visualstudio.microsoft.com/vs/msft-android-emulator/


How much time in hours have you spent trying to get it working today?

The good news is that the videos, while a pain in a different way,
at least show EVERY click on the screen!


I'm gobsmacked, really.

I have Apple equipment because I help people use Apple products.


You do what? Tell me you aren't actually charging people for that
help?

Except in marketing, compared to Windows/Linux/Android, iOS
stinks.


Huh?

That means, eventually, all my apps will also work on iOS; but
that will happen way later (if ever).


Umm. more likely the latter...Baby steps Arlen. Let's concentrate on
properly installing your programming environment before you try
tackling builds specifically for android vs builds specifically for
iOS.


We really should both be working the same tutorial if we want to
help each other ... so ... I guess what I should do, to help you,
is go _back_ to the original text tutorial - which I had abandoned
in favor of the video tutorials.
https://developer.android.com/training/basics/firstapp/


You should both take this to email if you wish to assist each other
and get any actual progress done as you do so. None of the groups
you're chatting in about this have anything specifically to do with
programming.

Those you think might benefit from your shared discussion would check
a programming newsgroup long before coming here expecting to find
programming information. And most likely, they wouldn't be completely
new to it, as you and Bill are. So, this conversation between the two
of you would really only benefit the two of you and should be taken
to email.

If anyone here has programming questions, they'll be checking
newsgroups specifically intended for that purpose, not reading a play
by play as you and bill learn how to install the programming package
and begin your first hello world program together. I hope it works
out, don't get me wrong, but I don't need the play by play and I
doubt anyone else reading in these newsgroups does either.


--
To prevent yourself from being a victim of cyber
stalking, it's highly recommended you visit he
https://tekrider.net/pages/david-brooks-stalker.php
================================================== =
Never attempt to distract a masturbating gorilla.
  #27  
Old November 3rd 18, 12:56 PM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Bill[_40_]
external usenet poster
 
Posts: 346
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

In message , Diesel
writes
Those you think might benefit from your shared discussion would check a
programming newsgroup long before coming here expecting to find
programming information. And most likely, they wouldn't be completely
new to it, as you and Bill are. So, this conversation between the two
of you would really only benefit the two of you and should be taken to
email.

This is almost certainly correct, and I agree that Arlen and I would
probably be better with our first steps carried out on email, but with
occasional reports/questions to _a_ newsgroup.

If anyone here has programming questions, they'll be checking
newsgroups specifically intended for that purpose, not reading a play
by play as you and bill learn how to install the programming package
and begin your first hello world program together. I hope it works out,
don't get me wrong, but I don't need the play by play and I doubt
anyone else reading in these newsgroups does either.


This is all very well, but a search shows 244 usenet groups with
"programming" in the name and none with any combination of "programming"
and "java". A recommendation of a specific programming group would be a
great help.

The other thing I would like to comment on is the use or need to stick
to the specific default directory setup with Android Studio. I wanted to
be able to locate and understand the various elements of the IDE and the
program. The whole point of doing this is to learn and having elements
in "phantom" directories is not helpful. If something IDE based doesn't
work, it is usually fairly simple to detect where something is looking
and revert to defaults if necessary.
A release version of any program should be able to be installed where
the user wants or should clearly state, or define , where it must be
installed.

I do appreciate any help and discussion here.
--
Bill

---
This email has been checked for viruses by AVG.
https://www.avg.com

  #28  
Old November 3rd 18, 04:31 PM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Apd
external usenet poster
 
Posts: 132
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

"Bill" wrote:
In message , Diesel
writes
Those you think might benefit from your shared discussion would check a
programming newsgroup long before coming here expecting to find
programming information. And most likely, they wouldn't be completely
new to it, as you and Bill are. So, this conversation between the two
of you would really only benefit the two of you and should be taken to
email.


This is almost certainly correct, and I agree that Arlen and I would
probably be better with our first steps carried out on email, but with
occasional reports/questions to _a_ newsgroup.


comp.mobile.android (to which I've directed followups) is appropriate
together with a java one.

If anyone here has programming questions, they'll be checking
newsgroups specifically intended for that purpose, not reading a play
by play as you and bill learn how to install the programming package
and begin your first hello world program together. I hope it works out,
don't get me wrong, but I don't need the play by play and I doubt
anyone else reading in these newsgroups does either.


This is all very well, but a search shows 244 usenet groups with
"programming" in the name and none with any combination of "programming"
and "java".


Why do that? The obvious thing to do is search for "java" then narrow.
it down. There's no reason for "programming" to be in the title. The
traditional place to look would be the comp.lang.* hierarchy and any
alt.* variants of that.

A recommendation of a specific programming group would be a
great help.


I've not looked but the obvious first places to check for activity
would be comp.lang.java.programmer and alt.comp.lang.java. There are
several groups in the comp.lang.java.* hierarchy. Ignore hierarchies
starting with prefixes like, for example, "fr." or "de." unless you
speak those languages and ignore "javascript" which is not the same
thing at all.


  #29  
Old November 4th 18, 07:56 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Sat, 3 Nov 2018 02:00:32 -0000 (UTC), Diesel wrote:

It's not really a trick Arlen. There's a bug of sorts. I haven't
isolated it to a specific package.


Thanks for the help where I spent a few hours on the problem today.
I made no progress, where the current status is the same as befo
o I can pop up the Microsoft Android Emulator from Android Studio 3.2.1
o But Android Studio 3.2.1 "adb" will not send the java file to the emulator

It turns out very many people have the issue I'm having which is simply
that Android Studio won't send the app to the Microsoft Android Emulator.

A key problem that is critical to keep in mind for anyone trying
to solve this is that there are Intel & AMD CPUs out there.
o Any solution for Intel CPUs does _not_ apply to AMD CPUs.
o Any solution for AMD CPUs does _not_ apply to Intel CPUs.

This is a key distinction because _most_ of the solutions are Intel only.
Hence, if a solution doesn't list AMD, by name, that solution is worthless.

It turns out that AMD was only recently supported by Google in July 2018.
https://www.infoq.com/news/2018/07/android-emulator-amd-hyperv

Which says as of Android Studio beta 3.2 emulation should work on AMD CPUs
https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html

As far as I know, I meet the requirements, but Android Studio 3.2.1 is
still not sending the java files to execute on the Microsoft Android Emulator yet.
[x]AMD Processor
[x]Android Studio 3.2 Beta or higher (I'm using Android Studio 3.2.1)
[x]Android Emulator v27.3.8+ (I'm using the latest MS Android Emulator)
[x]x86 Android Virtual Device (AVD) - Create AVD
[x]Windows 10 with April 2018 Update
[x]Enable via Windows Features: "Windows Hypervisor Platform"

I also added "adb" (which is in the SDK) to the path and I added the registry
key which is supposedly what the Microsoft Android Emulator is hard coded to,
but neither worked any better than nothing.
https://www.clearlyagileinc.com/agil...android-studio

1. Start the Microsoft Android Emulator set to the device to be emulated:
emulatorcmo.exe /sku:Android launch /id:363F7AED-462C-46BD-9FEC-F1DD3B79916C
2. Start your Android Studio and open up your project:
3. Configure Android Studio to use your new emulator by navigating to:
AndroidStudio321:Run Edit Configurations Defaults Android App
General Deployment Target Options Open Select Deployment Target Dialog
[x] Use same device for future launches
4. Run your app in Android Studio
AndroidStudio321:Run Run app
5. You'll be prompted to "Select Deployment Target"
6. Notice your MS Android Emulator is completely missing from the selections!
7. The issue really boils down to where the new emulator is looking for the
Android SDK. In most default installations of Android Studio bundled
with the SDK, the SDK is stored under:
C:\Users\[USER]\AppData\Local\Android\Sdk
The developers who wrote the MS Android Emulator hard-coded the path
to the SDK as: C:\Program Files (x86)\Android\android-sdk
AndroidStudio321: File Project Structure SDK Location
Android SDK location = C:\app\hardware\android\sdk
8. The developers of the MS Android Emulator store this hard-coded path
to the Android SDK in the Windows registry:
Start Run regedit
9. This key is "supposed" to exist, but it doesn't exist for me:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
10. What exists for me is only:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\
11. So I created this key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\
12. And set its string value to:
C:\app\hardware\android\sdk
13. It still didn't show up, so I rebooted the Windows 10 Pro desktop.
a. I started Android Studio 3.2.1
b. I started the MS Android Emulator
AndroidStudio3.2.1: Tools External Tools MS Android Emulator
c. I ran the app to get the "Select Deployment Target" window
It says "Initializing ADB" (so it's "adb" that doesn't see it!)
Drat. The MS Android Emulator _still_ doesn't show up.
c:\app\hardware\android\sdk\platform-tools\adb.exe

The question is which to add to the path?
c:\app\hardware\android\sdk
or
c:\app\hardware\android\sdk\platform-tools

Start Run %windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables
BEFO
PATH=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v 1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Users\[user]\AppData\Local\Microsoft\WindowsApps;

AFTER:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v 1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Users\[user]\AppData\Local\Microsoft\WindowsApps;c:\app\hardwa re\android\sdk\platform-tools;c:\app\hardware\android\sdk\platform-tools;
  #30  
Old November 4th 18, 08:50 AM posted to comp.mobile.android,alt.comp.freeware,microsoft.public.windowsxp.general
Arlen_Holder
external usenet poster
 
Posts: 96
Default Report: My first "hello world" using Android Studio freeware on Windows worked just fine (in about an hour)

On Sun, 4 Nov 2018 06:56:28 -0000 (UTC), Arlen_Holder wrote:

I made no progress, where the current status is the same as befo
o I can pop up the Microsoft Android Emulator from Android Studio 3.2.1
o But Android Studio 3.2.1 "adb" will not send the java file to the emulator


Here are related screenshots showing that everything is close,
where the _only_ thing not working, is that the Android IDE isn't sending
the java code to the Microsoft Android Emulator.

The java code from the IDE runs perfectly on the Android phone over USB:
o http://www.bild.me/bild.php?file=2116419androidstudio06.jpg

But the emulation does not work yet on the AMD CPU:
o http://www.bild.me/bild.php?file=3945600androidstudio07.jpg

Windows 10 Pro has the virtualization technology enabled:
o http://www.bild.me/bild.php?file=5832994androidstudio08.jpg

Which is compatible with AMD CPUs according to AMD checking tools:
o http://www.bild.me/bild.php?file=3975030androidstudio09.jpg

The MS Android Emulator pops up from from within Android Studio 3.2.1:
o http://www.bild.me/bild.php?file=2583074androidstudio10.jpg

But Android Studio 3.2.1 won't _send_ the java files to that emulator!
o http://www.bild.me/bild.php?file=6690816androidstudio11.jpg

Where I can't get the Microsoft Android Emulator to show up in the choices!
o http://www.bild.me/bild.php?file=2685733androidstudio12.jpg

Even though I have run the "Import Hardware Profile" GUI many times:
o http://www.bild.me/bild.php?file=1910896androidstudio13.jpg

Pointing to the cfg file provided by Microsoft for the Android emulator:
o http://www.bild.me/bild.php?file=8075950androidstudio14.jpg
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 10:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.