Exception in plugin AppDynamics Android Agent Installer 1.1.38 - android

I am unable to install the plugin AppDynamics Android Agent Installer from the marketplace of android studio. I'm getting below exception stack trace.
java.lang.NoClassDefFoundError: com/android/tools/idea/gradle/parser/GradleBuildFile
at com.appdynamics.androidstudioplugin.installer.BuildGradleFinder.findBuildGradle(BuildGradleFinder.java:19)
at com.appdynamics.androidstudioplugin.screens.ScreenController.setChosenModule(ScreenController.java:122)
at com.appdynamics.androidstudioplugin.screens.ModulePickerScreen$2.mouseClicked(ModulePickerScreen.java:196)
at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
at java.desktop/java.awt.Component.processEvent(Component.java:6419)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:971)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:906)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:838)
at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:808)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:505)
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.lang.ClassNotFoundException: com.android.tools.idea.gradle.parser.GradleBuildFile PluginClassLoader[PluginDescriptor(name=AppDynamics Android Agent Installer, id=com.appdynamics.androidstudioplugin, path=C:\Users\Administrator\AppData\Roaming\Google\AndroidStudio4.2\plugins\plugin, version=1.1.38)] com.intellij.ide.plugins.cl.PluginClassLoader#405b4138
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:95)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 42 more
I tried changing Gradle versions but still tucked here.
Here are my project configurations
Android Gradle plugin version : 3.2.1
Gradle version : 4.8.1
Kotin version : 1.3.11
Target & Compatible JDK : Java 8
I also have some screenshots attached.

This is likely due to using a newer version of Android Studio then is supported with the "Android Agent Installer" methodology:
"Android Studio 2.1.0 - 2.9.9, 3.2.1 - 3.9.9 (Not supported: 3.0.0 - 3.2.0, 4.0)" - from https://docs.appdynamics.com/21.9/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/instrument-an-application-with-the-android-agent-installer
Instead, follow these instructions to build using Gradle with the latest version: https://docs.appdynamics.com/21.9/en/end-user-monitoring/mobile-real-user-monitoring/instrument-android-applications/instrument-an-android-application-manually#InstrumentanAndroidApplicationManually-gradle-android-studio

Related

Why is the App Actions Test tool crashing in Android Studio

I am investigating Google actions by following this code lab
the version of Android Studio I am employing is this:-
Android Studio Dolphin | 2021.3.1 Canary 9
Build #AI-213.7172.25.2113.8473230, built on April 19, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
com.android.aas (3.5.1)
I have installed the App Actions Test Tool plugin (3.5.1)
however when I attempt to open the App test tool I receive the following stacktrace
update failed for AnAction(com.android.aaassistant.AppActionsAssistantSidePanelAction, id=AppActionsServices.ConnectionAssistant) with text=Help
java.lang.NoSuchMethodError: 'boolean com.android.tools.idea.connection.assistant.ConnectionAssistantBundleCreator.isAssistantEnabled()'
at com.android.aaassistant.AppActionsAssistantSidePanelAction.update(AppActionsAssistantSidePanelAction.java:14)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:637)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$7(ActionUpdater.java:129)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$9(ActionUpdater.java:200)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$10(ActionUpdater.java:198)
at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupFastTrack$3(Utils.java:256)
at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:582)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupFastTrack(Utils.java:254)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.java:171)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:278)
at com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenuInner(ActionMenu.java:362)
at com.intellij.openapi.actionSystem.impl.Utils.performWithRetries(Utils.java:620)
at com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenu(ActionMenu.java:341)
at com.intellij.openapi.actionSystem.impl.ActionMenu.lambda$new$0(ActionMenu.java:75)
at java.desktop/sun.lwawt.macosx.LWCToolkit$CancelableRunnable.run(LWCToolkit.java:677)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
at java.desktop/sun.awt.AWTThreading$4.dispatch(AWTThreading.java:218)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
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)
where have I gone wrong?
is it not possible to use the App Actions Test Tool plugin anymore?
How can I resolve this issue?

IntelliJ Android project isn't rendering the design layout

The design view isnt't there and when I checked for errors it said something that talks about render class loader
java.lang.AssertionError
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:81)
at com.android.tools.idea.rendering.ClassConverter.rewriteClass(ClassConverter.java:72)
at com.android.tools.idea.rendering.RenderClassLoader.convertClass(RenderClassLoader.java:184)
at com.android.tools.idea.rendering.RenderClassLoader.loadClass(RenderClassLoader.java:168)
at com.android.tools.idea.rendering.RenderClassLoader.loadClassFile(RenderClassLoader.java:149)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClassFile(ModuleClassLoader.java:301)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClassFromModuleOrDependency(ModuleClassLoader.java:239)
at org.jetbrains.android.uipreview.ModuleClassLoader.load(ModuleClassLoader.java:177)
at com.android.tools.idea.rendering.RenderClassLoader.findClass(RenderClassLoader.java:61)
at org.jetbrains.android.uipreview.ModuleClassLoader.findClass(ModuleClassLoader.java:124)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.jetbrains.android.uipreview.ModuleClassLoader.loadClass(ModuleClassLoader.java:224)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClass(ViewLoader.java:536)
at org.jetbrains.android.uipreview.ViewLoader.loadAndParseRClassSilently(ViewLoader.java:509)
at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadAndParseRClass(LayoutlibCallbackImpl.java:849)
at com.android.tools.idea.rendering.RenderTask.<init>(RenderTask.java:174)
at com.android.tools.idea.rendering.RenderService$RenderTaskBuilder.build(RenderService.java:590)
at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.inflate(LayoutlibSceneManager.java:830)
at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager.updateModel(LayoutlibSceneManager.java:904)
at com.android.tools.idea.uibuilder.scene.LayoutlibSceneManager$2.lambda$run$0(LayoutlibSceneManager.java:625)
at com.intellij.openapi.project.DumbServiceImpl.doRun(DumbServiceImpl.java:389)
at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:381)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:82)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$pollQueueLater$0(TransactionGuardImpl.java:67)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:873)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:461)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:460)
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)
There is a known issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-215785. It should be fixed in the nearest update.
You can do two things:
Check if there are some compile problem in your project. After check it, make a project's build .
Run Invalidate cache/restart

Android studio crashing after changing SDK to 12

so i tried changing my jdk from jdk8 to jdk12
and it's now crashing whenever i try to start it.
the
sudo /Applications/Android\ Studio.app/Contents/MacOS/studio
works for me when i try to launch my android studio
but then i dont work when i manually select android studio application
and it show this error:
nternal error. Please report to https://code.google.com/p/android/issues
java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:224)
at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:77)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
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:389)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:348)
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: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:258)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:504)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:471)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:217)
... 15 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:157)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:76)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:82)
at org.jetbrains.android.sdk.AndroidSdkData.<init>(AndroidSdkData.java:139)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:104)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:78)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:112)
at org.jetbrains.android.sdk.AndroidSdkData.getSdkData(AndroidSdkData.java:119)
at org.jetbrains.android.sdk.AndroidPlatform.parse(AndroidPlatform.java:86)
at org.jetbrains.android.sdk.AndroidSdkAdditionalData.getAndroidPlatform(AndroidSdkAdditionalData.java:127)
at org.jetbrains.android.sdk.AndroidPlatform.getInstance(AndroidPlatform.java:68)
at com.android.tools.idea.sdk.IdeSdks.getEligibleAndroidSdks(IdeSdks.java:600)
at com.android.tools.idea.sdk.IdeSdks.getFirstAndroidSdk(IdeSdks.java:193)
at com.android.tools.idea.sdk.IdeSdks.getAndroidSdkPath(IdeSdks.java:119)
at com.android.tools.idea.startup.GradleSpecificInitializer.setupSdks(GradleSpecificInitializer.java:304)
at com.android.tools.idea.startup.GradleSpecificInitializer.run(GradleSpecificInitializer.java:128)
at com.android.tools.idea.AndroidInitialConfigurator.activateAndroidStudioInitializerExtensions(AndroidInitialConfigurator.java:202)
at com.android.tools.idea.AndroidInitialConfigurator.<init>(AndroidInitialConfigurator.java:71)
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.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:85)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:62)
at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:45)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:462)
... 27 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema PluginClassLoader[org.jetbrains.android, 10.3.4.2] com.intellij.ide.plugins.cl.PluginClassLoader#71677abb
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:49)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 55 more
I tried reinstalling my android studio but still same error.
Know the compatibility of JDK for your version IntelliJ. Here is the link https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
Make sure your computer has the path for java. Try "java -version" in cmd to know your version.
Try running with admin privilege.

Gradle project sync failed without Messages, worked on command-line

In Android Studio, the sync failed:
Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.
The command-line gradle installDebug worked. There were no messages in the "Messages" view. In the idea.log, the following NullPointerException appeared:
2018-02-04 14:53:15,233 [ thread 15] WARN - ea.IdeaSyncPopulateProjectTask - Sync failed: null
java.lang.RuntimeException: java.lang.NullPointerException
at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:188)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:685)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeOnEdt(ExternalSystemApiUtil.java:469)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.executeProjectChangeAction(ExternalSystemApiUtil.java:458)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.dispose(ProjectDataManager.java:401)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:156)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:198)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager.importData(ProjectDataManager.java:204)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doSelectiveImport(IdeaSyncPopulateProjectTask.java:206)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:156)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:51)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:137)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.intellij.openapi.extensions.Extensions.disposeArea(Extensions.java:168)
at com.intellij.openapi.module.impl.ModuleImpl.dispose(ModuleImpl.java:153)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:151)
at com.intellij.openapi.util.objectTree.ObjectTree.executeUnregistered(ObjectTree.java:163)
at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:132)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:123)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:119)
at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.dispose(ModuleManagerImpl.java:836)
at com.intellij.openapi.externalSystem.service.project.AbstractIdeModifiableModelsProvider.dispose(AbstractIdeModifiableModelsProvider.java:421)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager$3.execute(ProjectDataManager.java:404)
at com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange.run(DisposeAwareProjectChange.java:36)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.lambda$null$6(ExternalSystemApiUtil.java:458)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.lambda$executeProjectChangeAction$7(ExternalSystemApiUtil.java:458)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:303)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:165)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:410)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:827)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2018-02-04 14:53:15,234 [ thread 15] INFO - e.project.sync.GradleSyncState - Gradle sync failed (4s 121ms)
Using Invalidate Caches/Restart and removing the .gradle folder did not help. Why is this? How is it fixed?
After unsetting a local gradle distribution in Settings > Build, Execution, Deployment > Gradle (which was set for debugging this problem), Android Studio offered to update to gradle:3.0.1 from gradle:3.0.0. This fixed it.
Previous steps taken:
add the google() repository to buildscript and allprojects
upgrade the compileSdkVersion, and targetSdkVersion to 27
upgrade all com.android.support libraries to 26.1.0
I was getting similar errors after I upgraded my Android Studio to 3.1.3. I don't remember the exact version I was on before that -- version 2 series.
The reason I was getting these errors was because the Gradle plugin version I was using was too low.
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
...
}
Once I updated the version from 2.2.3 to 2.3.3, then Android Studio was able to move on and give me more meaningful error messages such as
Gradle sync failed: Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in gradle/wrapper/gradle-wrapper.properties to gradle-3.3-all.zip
From there, it's just a matter of resolving version compatibility issues.
For me, it was a simple solution: I had deleted a module from my project and forgot to delete it from settings.gradle
Maybe this can help somebody

Gradle project sync failed on newly created Android project

I created an Android project in Intellij Idea (which I'm using instead of Android Studio because I also need to manage some React code in the project as well). I created a basic Activity which was the default for building the project:
package com.example.mypackage.reacttoastex;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
However, I am getting this error message in Intellij:
Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly
If I run Build Project, I am getting this:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find any version that matches com.android.support:appcompat-v7:27.+.
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 31 more
Required by:
project :app
In the logs, I am getting this:
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - IntelliJ IDEA 2017.2.5 Build #IU-172.4343.14
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - JDK: 1.8.0_152-release
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - VM: OpenJDK 64-Bit Server VM
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - Vendor: JetBrains s.r.o
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - OS: Mac OS X
2017-11-14 14:31:38,156 [4841535] ERROR - .intellij.util.io.HttpRequests - Last Action: GotoAction
2017-11-14 14:31:38,434 [4841813] INFO - ea.sdk.wizard.SdkQuickfixUtils - Downloading https://dl.google.com/android/repository/repository2-1.xml
2017-11-14 14:31:38,434 [4841813] ERROR - .intellij.util.io.HttpRequests - Assertion failed: Network shouldn't be accessed in EDT or inside read action
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:168)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:384)
at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:60)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:262)
at com.intellij.util.io.RequestBuilder.saveToFile(RequestBuilder.java:67)
at com.android.tools.idea.sdk.StudioDownloader.downloadFully(StudioDownloader.java:86)
at com.android.tools.idea.sdk.StudioDownloader.downloadFully(StudioDownloader.java:98)
at com.android.tools.idea.sdk.StudioDownloader.downloadAndStream(StudioDownloader.java:54)
at com.android.repository.impl.manager.RemoteRepoLoaderImpl.fetchPackages(RemoteRepoLoaderImpl.java:100)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:550)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:364)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.tools.idea.sdk.wizard.SdkQuickfixUtils.createDialog(SdkQuickfixUtils.java:129)
at com.android.tools.idea.sdk.wizard.SdkQuickfixUtils.createDialogForPaths(SdkQuickfixUtils.java:85)
at com.android.tools.idea.gradle.project.sync.hyperlink.InstallRepositoryHyperlink.execute(InstallRepositoryHyperlink.java:41)
at com.android.tools.idea.gradle.project.sync.hyperlink.NotificationHyperlink.executeIfClicked(NotificationHyperlink.java:38)
at com.android.tools.idea.gradle.notification.QuickFixNotificationListener.hyperlinkActivated(QuickFixNotificationListener.java:37)
at com.intellij.notification.NotificationListener$Adapter.hyperlinkUpdate(NotificationListener.java:31)
at com.intellij.openapi.externalSystem.service.notification.NotificationData$1.hyperlinkActivated(NotificationData.java:77)
at com.intellij.notification.NotificationListener$Adapter.hyperlinkUpdate(NotificationListener.java:31)
at com.intellij.openapi.externalSystem.service.notification.EditableNotificationMessageElement$MyCellEditor$ActivatedHyperlinkListener.hyperlinkUpdate(EditableNotificationMessageElement.java:186)
at javax.swing.JEditorPane.fireHyperlinkUpdate(JEditorPane.java:342)
at javax.swing.text.html.HTMLEditorKit$LinkController.activateLink(HTMLEditorKit.java:875)
at javax.swing.text.html.HTMLEditorKit$LinkController.mouseClicked(HTMLEditorKit.java:674)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
at java.awt.Component.processMouseEvent(Component.java:6544)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6306)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
What could be the cause of this?
Maybe the Android SDK is not seen?
Had this a similar issue today
Resolved it by adding the google maven repo:
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
Not my idea though (I'm brand new to Android development and only a bit familiar with Java), I found the answer here:
https://stackoverflow.com/a/47165271/8036618
Not sure what the cause is, but I'm behind a proxy, so maybe IDEA can't download from its default repo but it can download from the google maven repo?

Categories

Resources