'App not installing in emulator after upgrading to android studio chipmunk
So pushing the run app button in android studio compiles the app. But it does not install the compiled app into emulator. App is compiled successfully .
> Task :app:packageGoogleDebug UP-TO-DATE
> Task :app:createGoogleDebugApkListingFileRedirect UP-TO-DATE
> Task :app:assembleGoogleDebug UP-TO-DATE
BUILD SUCCESSFUL in 16s 41 actionable tasks: 41 up-to-date
it just stop here. Adb is working fine. i can see the emulator log in logcat.
i have 2 build flavour. Both are the same. Compiles but not installing.
buildscript {
repositories {
google()
mavenCentral()
maven {url 'https://developer.huawei.com/repo/'}
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath 'com.google.firebase:perf-plugin:1.4.1'
classpath 'com.huawei.agconnect:agcp:1.6.5.300'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {url 'https://developer.huawei.com/repo/'}
mavenLocal()
gradlePluginPortal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Solution 1:[1]
Found the culprit.. looking at android studio logs.. Its the HMS toolkit.. if you guys have that installed... just disable the plugin until huawei fix it.. the run button will work properly..
2022-05-10 16:52:43,924 [ 10645] ERROR - e.plugins.cl.PluginClassLoader - JDK: 11.0.12; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2022-05-10 16:52:43,924 [ 10645] ERROR - e.plugins.cl.PluginClassLoader - OS: Mac OS X
2022-05-10 16:52:43,924 [ 10645] ERROR - e.plugins.cl.PluginClassLoader - Plugin to blame: HMS Toolkit version: 6.3.0.3003.AF
2022-05-10 16:52:43,926 [ 10647] ERROR - e.plugins.cl.PluginClassLoader - Calling `ClassLoader#getResource` with leading slash doesn't work; strip
com.intellij.diagnostic.PluginException: /icons/pushkit/add_light.png [Plugin: com.huawei.deveco.hms]
at com.intellij.ide.plugins.cl.PluginClassLoader.doFindResource(PluginClassLoader.java:492)
at com.intellij.ide.plugins.cl.PluginClassLoader.getResourceAsStream(PluginClassLoader.java:462)
at com.huawei.kits.pushkit.utils.PushIconUtils.load(PushIconUtils.java:93)
at com.huawei.kits.pushkit.utils.PushIconUtils.<clinit>(PushIconUtils.java:62)
at com.huawei.kits.pushkit.ui.SampleMessagePanel.initPanel(SampleMessagePanel.java:87)
at com.huawei.kits.pushkit.ui.SampleMessagePanel.<init>(SampleMessagePanel.java:80)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.huawei.hms.core.main.module.manager.resloader.JarLoader.createObject(JarLoader.java:130)
at com.huawei.hms.core.main.module.manager.Module.lambda$createModuleView$0(Module.java:245)
at java.base/java.util.TreeMap.forEach(TreeMap.java:1002)
at com.huawei.hms.core.main.module.manager.Module.createModuleView(Module.java:239)
at com.huawei.hms.core.main.module.manager.Application.initAllModuleViews(Application.java:287)
at com.huawei.hms.core.component.InitProjectComponent.<init>(InitProjectComponent.java:65)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:877)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:60)
at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:407)
at com.intellij.openapi.project.impl.ProjectExImpl.init(ProjectExImpl.kt:183)
at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:178)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.prepareProject(ProjectManagerExImpl.kt:339)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.access$prepareProject(ProjectManagerExImpl.kt:56)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:123)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$doOpenAsync$1.invoke(ProjectManagerExImpl.kt:56)
at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:94)
at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressRunner$1.apply(ProjectFrameAllocator.kt:71)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:243)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:243)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)```
Solution 2:[2]
When I was facing the same issue, I raised a ticket to the Google team, they said Please uninstall the HMS ToolKit plugin, because It was causing issues.
you can check here.
Solution 3:[3]
Solution 4:[4]
- delete all build folders
- invalidate caches and restart
- create a new
API31
emulator and run 'app'
these steps worked for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | li9ht |
Solution 2 | |
Solution 3 | Sagar Sah |
Solution 4 |