I am getting the following exception in Android Studio plugin Android Support.
To get out of this error, I updated the Android Studio to 14.1, but studio just builds the app but not runs it.
null
java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1616)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1577)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:350)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:373)
at org.jetbrains.android.facet.AndroidFacet.getAvdManager(AndroidFacet.java:585)
at org.jetbrains.android.facet.AndroidFacet.getAvdManagerSilently(AndroidFacet.java:571)
at org.jetbrains.android.run.DeviceChooser.<init>(DeviceChooser.java:143)
at org.jetbrains.android.run.ExtendedDeviceChooserDialog.<init>(ExtendedDeviceChooserDialog.java:80)
at org.jetbrains.android.run.AndroidRunningState.execute(AndroidRunningState.java:263)
at com.intellij.execution.runners.DefaultProgramRunner.doExecute(DefaultProgramRunner.java:38)
at org.jetbrains.android.run.AndroidDebugRunner.doExec(AndroidDebugRunner.java:144)
at org.jetbrains.android.run.AndroidDebugRunner.doExecute(AndroidDebugRunner.java:135)
at com.intellij.execution.runners.GenericProgramRunner$1.execute(GenericProgramRunner.java:48)
at com.intellij.execution.impl.ExecutionManagerImpl$2.run(ExecutionManagerImpl.java:208)
at com.intellij.openapi.project.DumbServiceImpl.runWhenSmart(DumbServiceImpl.java:95)
at com.intellij.execution.impl.ExecutionManagerImpl$1$1.run(ExecutionManagerImpl.java:172)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
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)
I Slove it by this step
you should delete this file that you can do it .
go to the path :"C:\Users\Administrator.android\avd"
and delete all the avd folders files .
try again ,you can get it.
Why this happens
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1616)
The error seems to be in Android SDK library Android Virtual Device Manager. It tries to open a file, and some argument in File constructor is null.
Solution:
I installed the needed plugins again..and it works
What else can be done in similar situations:
Plugin damaged -> reinstall the plugin.
SDK damaged -> reinstall Android SDK.
Wrong version used -> check the used version or update Android SDK.
It seems to be due to virtual devices that are already created are causing problems.
How I solved this issue:
Delete all folders from C:\Users\<userName>\.android\avd
Recreate virtual device from avd manager
It can be solved by editing build.gradle file and synch your project again.
I edited following line
classpath 'com.android.tools.build:gradle:2.3.3' and it worked.
I solved this error by opening the AVD Manager in Android Studio and uninstalling and reinstalling my emulators.
Related
Internal error. Please refer to https://code.google.com/p/android/issues
at com.a.a.b.b.ar.a(ar.java:121)
at com.a.a.b.b.ar.a(ar.java:71)
at com.intellij.idea.MainImpl.start(MainImpl.java:19)
at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:303)
at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:245)
at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)
at java.lang.Thread.run(Thread.java:748)
I also encountered this exception, this is after I upgraded android studio 4.1, I could not open android studio and reported this error
java.lang.NoSuchMethodError: com.intellij.ide.plugins.PluginManagerCore.loadDescriptors()[Lcom/intellij/ide/plugins/IdeaPluginDescriptorImpl;
at com.a.a.b.b.ar.a(ar.java:121)
at com.a.a.b.b.ar.a(ar.java:71)
at com.intellij.idea.MainImpl.start(MainImpl.java:19)
at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:303)
at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:245)
at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)
at java.lang.Thread.run(Thread.java:748)
Later, I found that the root of the problem was actually that some plug-ins did not support higher versions, and then they couldn't start.
The solution is: go to this directory
C:\Users{user}\AppData\Roaming\Google\AndroidStudio4.1\plugins
Then copy all the folders or jar packages (in fact, the plug-ins you downloaded yourself), then delete the folders first, and then start android studio, if it can be started, then there is a problem with the plug-ins under this folder If it cannot be started, restore this file and continue to delete other files. If it is determined that there is a problem with the plug-in under this folder, delete one plug-in one plug-in, so that you can find out which plug-in has the problem through the loop, and delete it Ok
Not sure what happened. I was using it and then switched to editing an api file in Geany, then went back to Android Studio and got this error below. Tried uninstalling and reinstalling but still no go. Any ideas?
Internal error. Please refer to https://code.google.com/p/android/issues
java.lang.NoSuchMethodError: com.intellij.ide.plugins.PluginManagerCore.loadDescriptors()[Lcom/intellij/ide/plugins/IdeaPluginDescriptorImpl;
at com.a.a.b.b.ar.a(ar.java:121)
at com.a.a.b.b.ar.a(ar.java:71)
at com.intellij.idea.MainImpl.start(MainImpl.java:19)
at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:303)
at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:245)
at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)
at java.lang.Thread.run(Thread.java:748)
-----
JRE 1.8.0_242-release-1644-b3-6222593 amd64 by JetBrains s.r.o
/snap/android-studio/94/android-studio/jre/jre"
Remove lib folder .local/share/Google/AndroidStudio4.1/marketplace
or execute command
rm -rf ~/.local/share/Google/AndroidStudio4.1/marketplace/lib
It's working for me :-)
in ubantu: go to -> HOME/.LOCAL/SHARE/GOOGLE/ANDROIDSUTDIO4.1/marketplace
marketplace file need to remove then start android studio working fine
After Android Studio's Kotlin plugin update, It stopped working. Plugin is getting disabled automatically. Below error I am getting.
com.intellij.openapi.extensions.impl.PicoPluginExtensionInitializationException: Duplicate registration for EP: org.jetbrains.uast.uastLanguagePlugin: original plugin com.intellij, new plugin org.jetbrains.kotlin
at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.registerExtensionPoint(ExtensionsAreaImpl.java:286)
at com.intellij.openapi.extensions.impl.ExtensionsAreaImpl.registerExtensionPoint(ExtensionsAreaImpl.java:128)
at com.intellij.ide.plugins.IdeaPluginDescriptorImpl.registerExtensionPoints(IdeaPluginDescriptorImpl.java:328)
at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointsAndExtensions(PluginManagerCore.java:1352)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1264)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1393)
at com.intellij.ide.plugins.PluginManagerCore.getPlugins(PluginManagerCore.java:121)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentConfigs(ComponentManagerImpl.java:302)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:95)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:425)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:411)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:206)
at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:49)
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.dispatchEvent(IdeEventQueue.java:343)
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)
To solve this issue, you have to either upgrade or downgrade your kotlin plugin
Solution 1: Upgrade Plugin
First go to Tools menu > Select Kotlin > Configure Kotlin Plugin Updates > Select one of the kotlin plugin & press download (stable or early access, i chose early access to solve this issue)
And finally change the kotlin version in build.gradle(Project:) according to the
downloaded version
Solution 2: Downgrade Plugin
If your on mac then press: Command + ,
to open preference, then select plugin & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51
On Windows machine, press Control + Alt + S to open settings dialog, then select plugins & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51
Please Note: Do not uncheck kotlin in plugins else it will disable kotlin & fail to recognise kotlin file & syntax
If upgrading doesn't help try downgrading
when i faces the same issue with Android studio 3.1 Canary 5 with Kotlin version v1.2.10-release-IJ2017.1-1 (latest version as on 15 dec 2017) I tried the above solution which didn't work so i just uninstalled the update and it reverted back to version 1.1.51 and that worked without any issue
This issue has been resolved in the latest kotlin plugin version 1.2.0-release-Studio3.0-1. Try updating the kotlin plugin version.
A project syncing and building OK when on Android Studio 3.0 Canary 9. Just started failing the Gradle sync immediately after the upgrade to Android Studio 3.0 Beta 1!
Using the Android Studio bundled Java 8 without hacks on a Debian GNU/Linux 9 (Stretch, stable, up-to-date).
UPDATE: Solved with Beta 2
https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-2.html
Note: additional effort needed on rewriting code to avoid problematic Java libs for Android.
UPDATE: First try from Google
https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html
Several issues arise (e.g., errors about signature-polymorphic method without --min-sdk-version >= 26)
These issues were not present on Canary 9!
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: org.gradle.tooling.BuildException: com.android.dx.cf.code.SimException: signature-polymorphic method called without --min-sdk-version >= 26
(Google's nonsolution)
Original sync issue
Same issue on a Windows
Gradle error upgrading to Android Studio 3.0 Beta 1
From Studio
Build: 3.0 Beta 1, AI-171.4243858, 201708032321,
AI-171.4243858, JRE 1.8.0_152-release-915-b01x64 JetBrains s.r.o, OS Linux(amd64) v4.9.0-3-amd64 unknown, screens 1920x1080, 1920x1080
Gradle '...' project refresh failed
Cause: java.lang.NullPointerException
at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at java.nio.file.Paths.get(Paths.java:84)
at com.android.build.gradle.internal.scope.BuildOutput.getOutputPath(BuildOutput.java:222)
at com.android.build.gradle.internal.scope.BuildOutputs.lambda$load$2(BuildOutputs.java:243)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1376)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.android.build.gradle.internal.scope.BuildOutputs.load(BuildOutputs.java:245)
at com.android.build.gradle.internal.scope.BuildOutputs.load(BuildOutputs.java:184)
at com.android.build.gradle.internal.scope.BuildOutputs.load(BuildOutputs.java:140)
at com.android.build.gradle.internal.ide.BuildOutputsSupplier.lambda$get$1(BuildOutputsSupplier.java:55)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:397)
at com.android.build.gradle.internal.ide.BuildOutputsSupplier.get(BuildOutputsSupplier.java:50)
at com.android.build.gradle.internal.ide.BuildOutputsSupplier.get(BuildOutputsSupplier.java:35)
at com.android.build.gradle.internal.ide.AndroidArtifactImpl.getOutputs(AndroidArtifactImpl.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$ReflectionMethodInvoker.invoke(ProtocolToModelAdapter.java:592)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$AdaptingMethodInvoker.invoke(ProtocolToModelAdapter.java:397)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$PropertyCachingMethodInvoker.invoke(ProtocolToModelAdapter.java:625)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$SafeMethodInvoker.invoke(ProtocolToModelAdapter.java:647)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$SupportedPropertyInvoker.invoke(ProtocolToModelAdapter.java:670)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:356)
at com.sun.proxy.$Proxy220.getOutputs(Unknown Source)
at com.android.tools.idea.gradle.project.model.ide.android.IdeAndroidArtifactImpl.<init>(IdeAndroidArtifactImpl.java:57)
at com.android.tools.idea.gradle.project.model.ide.android.IdeVariantImpl.lambda$new$0(IdeVariantImpl.java:60)
at com.android.tools.idea.gradle.project.model.ide.android.ModelCache.lambda$computeIfAbsent$0(ModelCache.java:31)
at java.util.HashMap.computeIfAbsent(HashMap.java:1126)
at com.android.tools.idea.gradle.project.model.ide.android.ModelCache.computeIfAbsent(ModelCache.java:31)
at com.android.tools.idea.gradle.project.model.ide.android.IdeVariantImpl.<init>(IdeVariantImpl.java:59)
at com.android.tools.idea.gradle.project.model.ide.android.IdeAndroidProjectImpl.lambda$new$4(IdeAndroidProjectImpl.java:88)
at com.android.tools.idea.gradle.project.model.ide.android.ModelCache.lambda$computeIfAbsent$0(ModelCache.java:31)
at java.util.HashMap.computeIfAbsent(HashMap.java:1126)
at com.android.tools.idea.gradle.project.model.ide.android.ModelCache.computeIfAbsent(ModelCache.java:31)
at com.android.tools.idea.gradle.project.model.ide.android.IdeModel.copy(IdeModel.java:74)
at com.android.tools.idea.gradle.project.model.ide.android.IdeAndroidProjectImpl.<init>(IdeAndroidProjectImpl.java:87)
at com.android.tools.idea.gradle.project.model.ide.android.IdeAndroidProjectImpl.<init>(IdeAndroidProjectImpl.java:68)
at com.android.tools.idea.gradle.project.model.AndroidModuleModel.<init>(AndroidModuleModel.java:131)
at com.android.tools.idea.gradle.project.sync.idea.AndroidGradleProjectResolver.populateModuleContentRoots(AndroidGradleProjectResolver.java:214)
at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleContentRoots(AbstractProjectResolverExtension.java:103)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.doResolveProjectInfo(GradleProjectResolver.java:366)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.access$200(GradleProjectResolver.java:79)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:902)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:886)
at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:218)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:139)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:79)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:45)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:66)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:139)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:125)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:388)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:445)
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)
UPDATE: Android Studio 3.0 Beta 3
With the following list of bug fixes:
Seems like this issue is already gone. After Updating from 3.0 Beta 2 to 3.0 Beta 3, I don't have to manually clean the project.
UPDATE: Android Studio 3.0 Beta 2
From the official Android Studio 3.0 Beta 2 known issues:
If you have an existing Android Studio project that's
using an alpha version of Android plugin 3.0.0 (such as 3.0.0-alpha9),
you may get the following error when you migrate to Android plugin
3.0.0-beta1 (or higher) and sync your project: Gradle project refresh failed.
Resolve this issue by selecting Build > Clean Project from the menu bar.
You can fix this issue by doing this:
Build > Clean Project
Reference: https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html
Read here:
https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-1.html
Open the Terminal window by selecting View > Tool Windows > Terminal from the menu bar.
Delete all intermediate and cached build files with the following command: gradlew clean.
Build your project with the following command: gradlew assemble.
Sync your project files with Gradle by clicking Sync Project from the toolbar.
Or as I did, open the tab "Gradle" and run "clean" and then "assemble"
like this:
Go to your right at Android Studio, open the tab "gradle", then in ":app"/"Tasks"/"build" you will see "clean", "assemble" and other tasks.
Run first clean and then assemble, you may get an error but it still works and finally rebuild your project.
There is a solution offered by Google:
Resolve this issue selecting Build > Clean Project from the menu bar. You need to perform this action only once for each project. You can then sync your project files with Gradle by clicking Sync Project from the toolbar.
Following solutions didn't work for me :
Pressing that try again button again and again
Using offline and online gradle changes
Cleaning, syncing or rebuilding.
Solution:
After all these I just visited ~/.gradle folder, it contains a single folder named wrapper, just rename it to anything else i.e. wrapper123. That's it problem solved !!!! Press build and it will start syncing and building the project
I'm on Android Studio 3.0 Beta 2, and I found that on top of the clean and sync proposed here, for my project which was Java-Kotlin-mixed code base, I had to drop my Kotlin version to 1.1.3-2, which is the IDE bundled version, clean & sync then works, and then I can bring the Kotlin version back to 1.1.4 which is latest at the time of writing.
recquired online for until fix the error (fixing the gradle error.after successfully fixed the errror.you can work in offline.)
1.download latest gradle from ->https://gradle.org/releases
2.after downloading the zip files,it extract all the files into a folder (for good work:-name the folder 'gradle4',place the samelocal disc where your android studio installed eg-you installed android studio in local disc :c if place the 'gradle4' in local disc c)
3.android studio->file menu->settings->build,Excecution,Deployment->Gradle
4.check-use local gradle distribution
5.give gradle folder path into the gradle home optionScreen shot of gradle setting step 5
6.Enable embedded Maven Repository
Screen shot of Enable Maven Repository
click ->apply
Build menu->clean project
-problem solved-
I am having a very hard time installing a usable Android Studio on Opensuse 13.2.
I have tried Java OpenSDK 1.7.0_75-b13 and 1.8.0_40-b10 as well as the Oracle 1.8.0_31-b13 (setting STUDIO_JDK environment variable and checking File->Other Settings->Default Project Structure). I have installed Android Studio from scratch from the Android developer site. I have installed a brand new SDK in ~/Android/Sdk. I have deleted the old ~/.AndroidStudio directory to try to wipe out any previous configuration, but this has not helped.
The interface is unusable when opening a project because there are constantly ArrayOutOfBounds exceptions being thrown. These are in the Android Studio core, not code that I have written. The following screenshots illustrate the errors.
This occurs when an Android device is connected via USB for debugging.
-29359205: -29359205
java.lang.ArrayIndexOutOfBoundsException: -29359205
at sun.font.FileFontStrike.getCachedGlyphPtr(FileFontStrike.java:472)
at sun.font.FileFontStrike.getSlot0GlyphImagePtrs(FileFontStrike.java:438)
at sun.font.CompositeStrike.getGlyphImagePtrs(CompositeStrike.java:115)
at sun.font.GlyphList.mapChars(GlyphList.java:272)
at sun.font.GlyphList.setFromString(GlyphList.java:244)
at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:71)
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2928)
at com.intellij.openapi.editor.impl.EditorImpl.drawChars(EditorImpl.java:3426)
at com.intellij.openapi.editor.impl.EditorImpl.access$5000(EditorImpl.java:132)
at com.intellij.openapi.editor.impl.EditorImpl$CachedFontContent.flushContent(EditorImpl.java:2948)
at com.intellij.openapi.editor.impl.EditorImpl$CachedFontContent.access$5100(EditorImpl.java:2914)
at com.intellij.openapi.editor.impl.EditorImpl.flushCachedChars(EditorImpl.java:2989)
at com.intellij.openapi.editor.impl.EditorImpl.paintText(EditorImpl.java:2865)
at com.intellij.openapi.editor.impl.EditorImpl.paint(EditorImpl.java:1986)
at com.intellij.openapi.editor.impl.EditorComponentImpl.paintComponent(EditorComponentImpl.java:153)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JViewport.paint(JViewport.java:728)
at com.intellij.ui.components.JBViewport.paint(JBViewport.java:119)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495)
at javax.swing.RepaintManager.paint(RepaintManager.java:1265)
at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
at javax.swing.RepaintManager$4.run(RepaintManager.java:824)
at javax.swing.RepaintManager$4.run(RepaintManager.java:807)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731)
at javax.swing.RepaintManager.access$1300(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
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 gives? What do I have to fix to get a usable Android studio?
It appears this may be an Opensuse issue.
There is also a Java OpenStreetMap bug with workarounds that have not worked for me.
Opensuse bug indicates the OpenJDK font problem is triggered when the texlive-arphic-fonts package is installed. Removing it was a workaround for me.