Posts

Showing posts with the label android

Is openJdk upgrading to 8u292 break my aosp build system?

4 Software environment: Ubuntu 20.04 LTS server; Android AOSP 8.0; OpenJDK 8; It works very well util yesterday I upgraded my OpenJDK from 8u282 to 8u292. Now the broken building log says: Ensuring Jack server is installed and started FAILED: setup-jack-server /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tool...

How can I detect if another app is playing music?

25 4 The bounty expires tomorrow . Answers to this question are eligible for a +500 reputation bounty. grapefrukt wants to draw more attention to this question: From my own reading of the documentation, I don't think this is possible today, but I'd love to be proven wrong. I'm making a game and I would like to detect if something else is already playing music (or starts to play music) as...

Android Studio Gradle: Please remove usages of `jcenter()` Maven repository from your build scripts / JCenter is at end of life

9 3 In Android Studio 4.2 there is a warning: buildscript { ext.kotlin_version = '1.5.0' repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() mavenCentral() } } If I remove jcenter() then it can't find some dependencies of my app project: > Could not find org.koin:koin-core:2.0.1. Required by: project :app > Could not find org.koin:koin-androidx-scope:2.0.1. Required by: project :app > Could not find org.koin:koin-and...

Why am I getting AbstractDynamicObject$CustomMessageMissingMethodException error?

41 3 I have just started a new project and am trying to connect to Firebase. As soon as I try to build my project I got the error : Could not parse the Android application Module's Gradle Config, so I looked in my build which told me that jCenter() was deprecated and that I should remove it. When I removed it, everything worked fine. However, when I tried to connect to Firebase I got the error: AbstractDynamicObject$CustomMessageMissingMethodException. What may be causing this? Full stack trace: Caused by: java.lang.RuntimeException: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method setVariantDir() for arguments [debug] on task ...

Upgrading Android kotlin version to 1.5.0 throwing error message on build

6 1 Running with kotlin version '1.4.32' my Android project runs and builds. Trying to upgrade to kotlin '1.5.0' and my build throws: Execution failed for task ':app:kaptDefaultsDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction > java.lang.reflect.InvocationTargetException (no error message) I am not even sure where to start looking. Anyone else have problems upgrading to kotlin 1.5.0? android kotlin Share ...

Android Studio 4.2 Kotlin Plugin Issue

21 2 Cannot build a new project using Android Studio 4.2 because of the following error: A problem occurred configuring root project 'My Application'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom Required by: project : Possible solution: - Declare repository providing the artifact, see the docum...

Gradle tasks are not showing in gradle tool window in android studio 4.2

12 I just updated my android studio to version 4.2 . I had the surprise to not see the Gradle tasks in my project. It was working in the previous version 4.1.3 as we can see here: But now I only see the dependencies in version 4.2 : I tried to clear the cache of android studio and sync my project again. But no change. May it is a feature changes ? But I do not think so because it is really annoying to not see the gradle tasks in this tab. May someone got a solution about this ? I could see anything related to this problem on internet. Thanks a lot ! android android-studio gradle android-studio-4.2 ...

Can't create new Kotlin project after updating to Android Studio 4.2

6 I updated Android studio 4.2 but I wasn't able to create new project kotlin A problem occurred configuring root project 'My Application'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release- 764/kotlin-gradle-plugin-1.5.0-release-764.pom - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gr...

Emulator appearing offline on M1 Mac after the last update of arm64-v8a

8 3 Yesterday the emulator was working perfectly. The system image was arm64-v8a. I don't exactly remember the Release name of the working system image but, yesterday there was an update for the ARM 64 system image which I accepted and the release name is "S". I can start the emulator from my AVD Manager, the emulator also starts when I press the 'Run app' button however, the app isn't loaded on the emulator and the emulator appears offline if I check through "adb devices" or if I click on "Troubleshoot Device connections" it shows: "emulator-5554 - Device is currently in the offline state" I have tried most of the suggestions found on StackOverflow like: adb kill-server, adb start-server Remove and re-creat...

React Native - Play Store Warning “Starting May 5th you must let us know why your app requires broad storage access”

22 4 I have a react native app which is on play store for some time and recently i received this important notice from play store, stating if i don't fix this my app will be removed from play store. Can anyone tell me what this is and how to fix it? Here is the complete message from Play store We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs. Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either: Update your app to use more privacy friendly best practices, such as the Storage Access Framework or Media Store API ...