Author Topic: How do i use Android Studio?  (Read 453 times)

Offline Bluepixel

  • Mc. Print
  • *
  • Posts: 26
  • www.bluepixel-studios.net
    • View Profile
    • Bluepixel Studios
How do i use Android Studio?
« on: 2019-Nov-09 »
Hi there, I was super excited to try out android studio, when I compiled to android it told me to install android studio so I did. I created a simple hello world program and when I compiled for android it started up android studio, started updating some stuff and after a long time of waiting I just got errors.

Ive tried a lot to make this work but nothing seems to work.
Is there maybe a tutorial or guide on how to use android studio?
www.bluepixel-studios.net

There are two ways to write error-free programs; only the third one works.
(Alan J. Perlis)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1715
    • View Profile
Re: How do i use Android Studio?
« Reply #1 on: 2019-Nov-09 »
Check the readme in the android studio folder created by GLB after you compile.
Also the Android Studio SDK Manager needs to have SDKs and libraries installed - you can find more about those online...


There are certain things you need to change and others you need to leave as is.

build .gradle at the app level >

  // GLBASIC_USER_NOTE versionCode, versionNumber, target SDK
        minSdkVersion 23
        targetSdkVersion 29


androidmanifest.xml - make sure you have it setup correctly if you edited it.

Below image is my SDK tools setup.



Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 244
  • UNUS SED LEO
    • View Profile
Re: How do i use Android Studio?
« Reply #2 on: 2020-May-04 »
Hi. I can't compile Android with last version Android Studio 3.6.3. Getting below error:
Do you have any advice on how to proceed?
Below image is my SDK tools setup.
Version Java java 1.6.0-25
Thank you

"ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.1.0.
Disable offline mode and sync project
Show Details
Affected Modules: app"


Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 349
    • View Profile
    • my personal website
Re: How do i use Android Studio?
« Reply #3 on: 2020-May-04 »
I will join Your question. What beside Android Studio is currently needed to compile for Android - like specific JDK/Java version or some other tools (as for other tools that I checked recently they for example advised to use older Python versions and so on) are needed? Or I missing some tutorial that's available here on forum and it's up-to date..
Check my source code editor for GLBasic - link Update: 20.04.2020

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3918
    • View Profile
    • Space Fractal
Re: How do i use Android Studio?
« Reply #4 on: 2020-May-04 »
Java 1.6.0-25 and any other sun java is not required at all as Android Studio uses OpenSDK version of Java instead, which is included with Android Studio and installed by default. So you dont need to use any of the official java version at all!

Also if Android Studio want you to update project settings to newer settings in a project, then the project can cause fails to compile completly.

But if that was happens, its very easy to revert it again:

in File/Project Structure/Project

Make sure Android Grandle Plugin uses version 3.4.1 and Grandle version uses 5.1.1. We can uses a bit newer version here, but those versions should works and still works nicely today (has just released PowerUp Elevation today)!

Also im do heard androidx.appcompat:appcompat:1.1.0 is depreacted? howover line is still there and should not cause any trouble throught when that grandle versions above is using.

After that, open the grandle file again and sync. Then any missing sdk, cmake and ndk that is required should now been downloaded automatic. This take some time.

« Last Edit: 2020-May-04 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1715
    • View Profile
Re: How do i use Android Studio?
« Reply #5 on: 2020-May-04 »
Also, make sure to sync project before builds - and might need a clean project with the new update.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs