-
-
Notifications
You must be signed in to change notification settings - Fork 29
Android
Android 13 Beta | SDK/API 33 (levels) | Tiramisu | T
- Nov 2007 - Android SDK
- Oct 2008 - Google Play (service)
- Oct 2010 -
Google TV (OS) - Mar 2014 - Wear/Watch (OS)
- Jun 2014 - Android TV (OS)
- https://source.android.com
- https://android-review.googlesource.com
- https://ci.android.com/builds/branches/aosp-master/grid
...open-source build automation tool focused on flexibility and performance...
...build scripts are written using a Groovy or Kotlin DSL...
- https://docs.gradle.org/current/release-notes.html
- https://docs.gradle.org/X.X-rc-X/release-notes.html
- https://docs.gradle.org/nightly/release-notes.html
~/.gradle/caches/*
cd android
./gradlew wrapper --gradle-version=7.x --distribution-type=all
gradle <command> -PreactNativeArchitectures=arm64-v8a
The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building Android apps
Altho the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately
- https://developer.android.com/studio/projects/install-ndk#default-ndk-per-agp
- https://maven.google.com/web/index.html#com.android.tools.build:gradle
- https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
- https://android.googlesource.com/platform/tools/base/+log
...a toolset that lets you implement parts of your app in native code, using languages like C and C++
For certain types of apps, this can help you reuse code libraries written in those languages
e.g. https://dl.google.com/android/repository/emulator-darwin_aarch64-8129060.zip- e.g. https://dl.google.com/android/repository/sys-img/google_apis/arm64-v8a-31_r09.zip
- installs to
/Users/<user>/Library/Android/sdk/emulator
emulator -avd Pixel_3a_API_31_arm64-v8a -wipe-data
Badges badges everywhere
/Users/<user>/Library/Logs/Google
android/.gradle/
android/.idea/
android/app/build/
android/build/
android/local.properties
android/app/build/ASSETS/createBundleReleaseJsAndAssets/index.android.bundle
android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
android/app/build/outputs/bundle/debug/app-debug.aab
android/app/build/outputs/bundle/release/app-release.aab
Any aarch64 JDK v11+ (unofficial, ~x2 faster), official 32-bit slower
java --version # Current
/usr/libexec/java_home -V # JVMs
export JAVA_HOME=`/usr/libexec/java_home -v 11` # Set v11
https://github.com/mdogan/homebrew-zulu#versions
Set JDK for Android Studio
Setting up the development environment
Which version of JDK should I use? (whichjdk.com)
# gradle.properties
# ...
# Android Studio (aarch64 or aarch32) e.g.
org.gradle.java.home=/Users/<user>/Library/Java/JavaVirtualMachines/azul-18.0.1/Contents/Home
# Brew e.g.
org.gradle.java.home=/Library/Java/JavaVirtualMachines/zulu-18.jdk/Contents/Home
jenv add <path>
e.g.
- https://dl.google.com/android/repository/build-tools_r33-rc3-macosx.zip to
/Users/<user>/Library/Android/sdk/build-tools/33.0.0-rc3
adb reverse tcp:8097 tcp:8097
adb install <path-to-apk>
adb uninstall <applicationId>
e.g. io.metamask
Execution failed for task ':app:installDebug'
> java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE
Wipe/reset (-wipe-data
) emu data (user data image copied from initdata)
Execution failed for task ':app:installDebug'
> java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Unknown failure: Exception occurred while executing 'install':
android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
Restart emu
!bootstrap.error.message.internal.error.please.refer.to.0!https://code.google.com/p/android/issues!
java.lang.IllegalAccessError: class com.intellij.idea.StartupUtil (in unnamed module @0x11a5a6ea) cannot access class sun.awt.AWTAutoShutdown (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @0x11a5a6ea
at com.intellij.idea.StartupUtil.start(StartupUtil.java:301)
at com.intellij.idea.Main.bootstrap(Main.java:140)
at com.intellij.idea.Main.main(Main.java:83)
-----
!bootstrap.error.message.jre.details!16.0.1+9 x86_64 (AdoptOpenJDK)
/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home!
Internal error. Please refer to https://code.google.com/p/android/issues
com.intellij.ide.plugins.StartupAbortedException: UI initialization failed
at com.intellij.idea.StartupUtil.lambda$start$15(StartupUtil.java:268)
at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.util.concurrent.CompletionException: java.lang.IllegalAccessException: symbolic reference class is not accessible: class com.apple.laf.AquaLookAndFeel, from class com.intellij.ide.ui.laf.darcula.DarculaLaf (unnamed module @6ae7f2a3)
at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$22(StartupUtil.java:464)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
... 14 more
Caused by: java.lang.IllegalAccessException: symbolic reference class is not accessible: class com.apple.laf.AquaLookAndFeel, from class com.intellij.ide.ui.laf.darcula.DarculaLaf (unnamed module @6ae7f2a3)
at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:957)
at java.base/java.lang.invoke.MethodHandles$Lookup.checkSymbolicClass(MethodHandles.java:3675)
at java.base/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3647)
at java.base/java.lang.invoke.MethodHandles$Lookup.findConstructor(MethodHandles.java:2757)
at com.intellij.ide.ui.laf.darcula.DarculaLaf.createBaseLaF(DarculaLaf.java:345)
at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$22(StartupUtil.java:458)
... 15 more
-----
Your JRE: 16.0.1+9 x86_64 (AdoptOpenJDK)
/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home
Issue here was incompatible JDK
Issue here was corrupted Android SDK, re-install