What do I need for Android development?

I have FINALLY given up on Windows Phone. I LOVE my 950xl and my wife’s 950 and I loved the xaml development with Oxygene. Over the MANY years that I’ve worked with Microsoft development, they were finally getting it right, until Balmer left. Then it all fell apart. Such good stuff wasted. Oh well.

But now I am forced to look elsewhere. So I got a couple of Samsung Galaxy S10’s.

Now the question is, “What do I need to install from where to work with Android development”?

I know my phones have Android 9 Pie on them. First blush looking at developer.android.com I see something about Q and beta… Where do I find the production Pie stuff that I need with Oxygene in Visual Studio Professional 2017 (or Water for that matter)?

I’m really new to Android, so be gentle :wink: Thanks.

… time passes …

I see in Tools|Android|SDK manager that I have at least some of Pie and Nougat. And “Google Play Intel x86 Atom System Image”.

If I make a new project and try to build it, I get “The Android SDK was not found, is not set up in CooperPaths.xml, or does not exist”

Check out

https://docs.elementscompiler.com/Fire/Setup/ (Fire or Water)
https://docs.elementscompiler.com/VisualStudio/Setup/ (VS)

Essentially you need to install Java SDK 8 (don’t use 9 or later, Android doesn’t work with them) and Android Studio to get the Android SDK, and then you’re good.

Elements should find your Android SDK install automatically, but if it doesn’t;, you can manually specify the folder in Tools|Options.

Thanks a lot Marc. I’ve played just a bit with Java in the past using Oxygene to make a jar for some encryption that a 3rd party needed, but the whole UI and lots of libraries will be new to me.

1 Like

Is there going to be some sort of problem with Oracle and Java SDK 9 not working with Android down the road? Or is that just some temporary thing about it not working?

No idea. Java is at what, 11 now, and Google still hasn’t;t bored to fix their tools to work on v9. They sue some private Apis that are gone in 9, APK builder will crash. You need to keep using Java 8.

But that’s a problem for the entire Android ecosystem, not just Elements. If Java 8 ever stops working, Google will have to sort this out. So I’m not too worried (beyond the annoyance of having to keep Java 8 installed, even though the Java updater begs me to delete it because its outdated, every time… :wink:

I have everything working in Android Studio and can create and run default app in virtual emulator (though it looks like it is doing nougat as far as I can tell) and on the device (where it looks like a One UI app as far as I can tell).

And I think I successfully created and ran an Android Application in VS yesterday in a virtual device, now that I have run stuff in Android Studio and set up my phone on the USB, when I try to do a Debug|Start in VS, I get this error:

------ Build started: Project: org.me.androidapplication3, Configuration: Debug ------
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Error debugging project: Unknown device ''

Do I have something messed up?

Also, when I right click on the Project file in the Solution Explorer, and then click on the “Edit User Interface Files in Android Studio”, I get an error. When I looked, the path for Android Studio was empty. So I found where the program was and filled that in for the option “Android Studio Path”. I used “C:\Program Files\Android\Android Studio\bin” which is where the “studio64.exe” is.

But when I try to do the edit, I get “Could not start Android Studio. The system cannot find the file specified.” I tried adding the name of the program in the Options too, but it didn’t make a difference.

… time passes …

I tried to make a new android project in Water. I selected the Galaxy S10 Device on the USB, and when I tried to run, Water crashed.

Maybe these problems have to do with the Java version you were mentioning? (though Android Studio ran fine).

… time passes …

I went back into Water and tried to use the Nougat emulator. The emulator booted up, but I get an error message dialog that says it is waiting for the debugger to attach.

… time passes …

Now that the emulator is still running after stopping Water’s debugging session, I tried running the debug again and I think it ran. Probably a timing error with the emulator not being ready for the attach, I’m guessing. So at least water is able to run with the Nougat emulator.

… time passes …

I read another thread where someone ran water on the device and that failed somehow, then ran on the emulator and that worked. Then they ran on the device again, and it worked.

I tried the same in Water. After it successfully ran in Water, and then I tried the device, it worked and did not crash or give any error messages.

… time passes …

I saw on that thread a discussion of “crossbox”, so I went to VS and saw the combobox there. Changed to my device and it ran.

So the only problem left (for me) is that the android studio doesn’t launch when asked.

Can I get the crash report?

Doubtful.

can I get the exact output, from, Build and Debug log panes

? maybe its just taking a while?

iirc that was either fixed or didn’t;t repro anymore.

Can you pray tell share what that error message is? Does the same work in Water?

I’ll need to defer to the VS team to see what exactly it expects in the setting, the folder or the .exe name. I believe Water currently doesn’t laugh ADS at all, it will just show a the folder with the generated sync project in Explorer. (i’ll try to get that hooked up for this weeks beta).

Update: I checked the code that reads the default from the registry for there Android Studio setting, and on my system that points to C:\Program Files\Android\Android Studio — i.e the folder that contains bin\studio.exe. so thats what you should procide,m to specify it manually.

can you also check if you don’t have HKLM\Software\Android Studio\Path set isn the registry? if you have, this should be read and detected automatically.

Don't know what ADS is. I'll have to search for what all these Android acronyms are...

Path in registry was:

C:\Program Files\Android\Android Studio

I took the “bin” part of the path I put in there manually off, and then it could load. Didn’t know it should be where the “bin\studio64.exe” was rather than just “studio64.exe”.

I take it there is no designer for Android in VS. Is there one for Water? Or we just use Android studio for that bit?

Probably if that is the case, we should just create libraries in Oxygene that can be used by the main Android Studio app? What is best practice?

… time passes …

Although the Android Studio loaded, after a while of churning, it said gradle and/or gradle plugins needed to be newer. I clicked the update button and after some more churning it said:

|Run build|1 s 639 ms|
| --- | --- |
|Load build|71 ms|
|Configure build|1 s 543 ms|
|null||
|C:/Users/xxx/source/repos/org.me.androidapplication4/org.me.androidapplication4/obj/Android||
|app/build.gradle||
|Could not find method jackOptions() for arguments [build_1dtmqkqevtl593vyma61leco8$_run_closure1$_closure3$_closure6@1d4ec] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=15, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=28, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=1, versionName=1.0, applicationId=org.me.androidapplication4, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig. [Open File](openFile:C:\Users\xxx\source\repos\org.me.androidapplication4\org.me.androidapplication4\obj\Android\app\build.gradle)||
|Sync Failed|1 s 906 ms|

Don’t know what “jackOptions” is.

A yellow banner over the source code window said:

"Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly"

… time passes …

If I tell it to ignore the update for gradle and “remind me tomorrow”, it seems to load and I see a designer. I guess that is what to do for now.

… time passes …

Okay, I give up for today. I’m whipped and all of this is too much to absorb and try to get running for now.

Thanks for the help…

AnDroid Studio. :wink:

I’ve consolidating this for vNext. the setting will point to the final studio*.exe, moving forward (and it should auto-detect the actual .exe from the registry, if the sewttig is empty.

Correct. you can edit the XML files in Water of VS, or launch Android Studio to edit them there, visually.

Still create the app in Elements, just use Android Studio to edit the xml, if needed (you’ll find you wont do much of that anyways, and mostly use either code or hand[tweak the XMLs.

Not quite the same platform but Water itself is all WPF, XAML. I’ve never eve once used the Visual Editor in VS for this; generating the GIU by writing Xaml code is create much better results. <uch the same is true for Android Layout files.

Welcome to Android Studio, and why you want to use it as little as possible. Honestly, I dont get how people, use it as they all-day IDE without killing themselves :wink:

That makes two of us. never heard of it until just now.

That should suffice, though.

That’s all you need/want, though.

I agree with you on the designer usage. I rarely used the designer to actually design the UI in xaml (Silverlight or WPF). HOWEVER, when I first started doing Silverlight (happened before I started using WPF), I depended on the designer to “learn” what was there and how to hook things up.

Later, I was all about just typing stuff in. I distinctly remember traveling up to Toronto, Ont from the Buffalo, NY area to get a first look at what Microsoft was doing and when I saw them doing typing of xaml I thought, “That is the best they could do. That is a lot of steps backward and very verbose.”

But once I got the hang of it and started making my own object classes and being able to control the properties of the objects (instead of using the limiting way the designer did things), there was no looking back. Now I understood what they did and why they did it.

Wish XAML had become universal. Oh well.

Onward to Android.

1 Like

Uh oh. Am I missing something when editing the XML in VS? In xaml, there was code completion. Do you have to know what the parameters are for the xml elements? Or is there code completion switch somewhere in VS?

… time passes …

I see Android Studio has the code completion. However, I tried opening the same project (or at least I thought I did) in VS and AS. I changed stuff in Android and expected VS to say, “Hey it was modified”. But it didn’t. I even saved in AS and re-opened in VS and I don’t see the changes.

I’m researching that still, but something odd is going on…

Never mind about this last stuff about syncing between the two. For some odd reason, it is working as I expect now. odd. But still no CC in VS. I suppose ALL the editing for xml or designer will be done in Android so completion will be there.

I know this isn’t a RemObjects problem, but I decided to reinstall Android Studio. So I uninstalled it and reinstalled it. After reinstalling, the 2 virtual devices that had been there are gone. And when I try to create a virtual device with the AVD manager, it says “creating…” and stays there for at least 10 minutes so far.

I killed it before, but when I restarted it, it just tried to go back into “creating…”. So I rebooted and was able to delete the virtual device files. Then I tried recreating the virtual device and it hung again.

Any suggestions?

No off-hand, sorry. I’m far from being an Android and Android Studio expert, myself. I just suffer thru it the few times I have to deal with it when updating SDKs or creating VMs. Have you tried the command line tools for creating devices? if nothing else, maybe they give a better error…

Command line… ugh. Even more to learn.

At this point, I will just try running things on my device. It is quicker anyway, I guess.

Thanks anyway.

1 Like

emulator.bat (or .exe, not sure) in tools folder of the SDK.

I think I give up for today. Now the Android Studio can run on the device (it presents a prompt window which lists my USB device). But in Visual Studio, it doesn’t show any devices or emulators, so I can’t run it on the device.

Just tiring…

does running add devices list the device(s)?