Andres Sandoval

Tutorial shows how to add “top bar” title app name to an Android Compose activity. Create function topBar() copy snippet below, change string “My Important Dates”.

@Composable
fun topBar() {
TopAppBar(title = {
Text(
text = "My Important Dates",
style = MaterialTheme.typography.h6,
textAlign = TextAlign.Center
)
})
}

Call…

--

--

How to push your local code to a new GitHub repo:

  1. Create a repo on GitHub.
  2. Follow GitHub instructions.

OR do below commands:

echo "# AndroidComposeAdMobSDK" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:AndreSand/AndroidComposeAdMobSDK.git
git push -u origin main…

--

--

Error message “Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8”

Android Studio error

Fix: (Mac)

  1. Click Android studio -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK-> Select version 11
  2. Clean and build project

--

--