I updated from Android Studio 3.1.4 to 3.2. Now sync fails with the error message
Sync finish event has not been received
How can this be fixed? Invalidate Caches/Restart did not help.
The ida log shows the following warning:
java.lang.NoClassDefFoundError: org/gradle/wrapper/WrapperConfiguration
at org.jetbrains.plugins.gradle.util.GradleUtil.getWrapperConfiguration(GradleUtil.java:92)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:208)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.doGetGradleHome(GradleInstallationManager.java:194)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:129)
at org.jetbrains.plugins.gradle.GradleManager.lambda$getExecutionSettingsProvider$2(GradleManager.java:150)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:732)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:201)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:177)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:132)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:269)
at com.sun.proxy.$Proxy148.getResolver(Unknown Source)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:84)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:163)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:550)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:647)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
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.ClassNotFoundException: org.gradle.wrapper.WrapperConfiguration PluginClassLoader[org.jetbrains.plugins.gradle, 181.5540.7.32.5014246] com.intellij.ide.plugins.cl.PluginClassLoader#5f6fe2bb
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
The only solution I found was to remove Android Studio and reinstall Android Studio 3.2 from scratch.
EDIT
The problem might be different from OP but this is also a new issue in AS 3.2 which gives you Gradle sync error
I had Gradle sync error for the last couple of days after I updated to AS 3.2 and in my case, the problem was one of my library modules contain the following in Manifest.xml
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="27" />
and the solution was to remove 'uses-sdk' (in AndroidManifest.xml file) in ALL the modules in your project.
Try to look into the log of the IDE, for my case it was a flutter plugin causing the issue..
You can navigate to the logs by clicking on show log in the gradle try again strip at the top.
or
go to
~/username/Library/Logs/AndroidStudio3.5/
and read the idea.log file.
java.lang.NoClassDefFoundError:
org/gradle/wrapper/WrapperConfiguration
It seems like WrapperConfiguration class couldn't be found. Try these commands:
brew install gradle
gradle wrapper
The second line will install wrapper class. And then,
gradlew clean
Related
I've updated to MacOS Catalina. This morning while I was working on my Android project, it suddenly started giving the following exception: "ERROR: Cause: error=86, Bad CPU type in executable".
I suspect it it because I updated to macOS 10.15 AND because I tried to build the APK for my project (so it rebuilt the renderscript stuff). Here is the full stack trace given:
org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/Users/name/Library/Android/sdk/build-tools/28.0.3/arm-linux-androideabi-ld''
at org.gradle.process.internal.DefaultExecHandle.execExceptionFor(DefaultExecHandle.java:232)
at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:209)
at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:356)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
at org.gradle.internal.operations.CurrentBuildOperationPreservingRunnable.run(CurrentBuildOperationPreservingRunnable.java:38)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: net.rubygrapefruit.platform.NativeException: Could not start '/Users/name/Library/Android/sdk/build-tools/28.0.3/arm-linux-androideabi-ld'
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
at org.gradle.process.internal.ExecHandleRunner.startProcess(ExecHandleRunner.java:97)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:70)
... 7 more
Caused by: java.io.IOException: Cannot run program "/Users/name/Library/Android/sdk/build-tools/28.0.3/arm-linux-androideabi-ld" (in directory "/Users/name/Documents/Projects/onlinetrucks_android/MyApplication/app"): error=86, Bad CPU type in executable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
... 10 more
Caused by: java.io.IOException: error=86, Bad CPU type in executable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 11 more
and on doing a Gradle Sync, I get
warning: Linking two modules of different target triples: /Users/name/Library/Android/sdk/build-tools/28.0.3/renderscript/lib/bc/x86/libclcore.bc' is 'armv7--linux-android' whereas '/Users/name/Documents/Projects/onlinetrucks_android/MyApplication/app/build/generated/res/rs/debug/raw/bc32/singlesource.bc' is 'armv7-none-linux-gnueabi'
and
Execution failed for task ':app:compileDebugRenderscript'.
A problem occurred starting process 'command '/Users/name/Library/Android/sdk/build-tools/28.0.3/arm-linux-androideabi-ld''
Is there a way to force Android studio to try and use the 64-bit compliant versions of the libraries instead? Any help would be appreciated, as a huge part of the project depends on Renderscript.
Additional notes:
I do not use androidX in this project, as it messes up renderscript and then causes it to NOT be compatible for Google Play's 64-bit requirement.
The renderscript part in my gradle file looks like:
renderscriptTargetApi 22
renderscriptSupportModeEnabled true
To anyone having the same issue, this is a bug. When using renderscript, the linker uses the 32 bit file. Multiple bugs have been logged. If you want to keep track, you can follow what is happening over here:
https://issuetracker.google.com/issues/142590626
Holding thumbs that they fix it soon!
UPDATE: They have fixed it in the latest buildtools version 29.0.3. You also need to update to Android Studio 3.6 to use it.
BONUS: For anyone else trying to update to AndroidX AS WELL - Renderscript might break on Android6. There is a workaround (as far as I can tell) where you set renderscriptSupportModeEnabled to false - but it doesnt fix it for ALL devices (eg. Xiomi Redmi go - Android 8.1 - then breaks for me).
I am using Android studio 4.0, and this issue got fixed for me by just updating the gradle version.
In build.gradle of app:
- ext.gradle_version = '3.5.3'
+ ext.gradle_version = '4.0.0'
And in gradle/wrapper/gradle-wrapper.properties:
- distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
After updating to Android Studio from 3.0.1 to 3.1, and updating all plugins and SDK tools i am no longer able to debug my native application.
The error is 'Execution finished' (ExecutionFinishedException) which is raised in LLDB.
LLDB version is 3.1.4508709 (which is the latest).
If i try and debug with an earlier version of LLDB i get an error LLDB is missing (or similar).
Error details:
Execution finished
com.intellij.execution.ExecutionException: Execution finished
at com.jetbrains.cidr.execution.ExecutionResult.get(ExecutionResult.java:38)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.getProtobufClient(LLDBDriver.java:90)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.executeConsoleCommand(LLDBDriver.java:1109)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.executeConsoleCommand(LLDBDriver.java:1103)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadStartupScripts(AndroidLLDBDriver.java:321)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.commonLoad(AndroidLLDBDriver.java:132)
at com.android.tools.ndk.run.lldb.AndroidLLDBDriver.loadForAttach(AndroidLLDBDriver.java:248)
at com.android.tools.ndk.run.AndroidNativeAppDebugProcess.prepareTarget(AndroidNativeAppDebugProcess.java:101)
at com.android.tools.ndk.run.AndroidNativeDebugProcessImpl.doLoadTarget(AndroidNativeDebugProcessImpl.java:123)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess.lambda$start$0(CidrDebugProcess.java:314)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:703)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$MyCommandProcessor.consume(CidrDebugProcess.java:693)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$0(QueueProcessor.java:93)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:93)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$3(QueueProcessor.java:226)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$4(QueueProcessor.java:226)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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: com.intellij.execution.ExecutionFinishedException: Execution finished
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$4.processTerminated(LLDBDriver.java:248)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:239)
at com.sun.proxy.$Proxy16.processTerminated(Unknown Source)
at com.intellij.execution.process.ProcessHandler$4.run(ProcessHandler.java:196)
at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:272)
at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:177)
at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:173)
at com.intellij.execution.process.BaseOSProcessHandler.onOSProcessTerminated(BaseOSProcessHandler.java:192)
at com.intellij.execution.process.OSProcessHandler.onOSProcessTerminated(OSProcessHandler.java:89)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:155)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:140)
at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:66)
... 5 more
Last 2 lines from gdb-server log:
1522263876.330623627 NativeProcessLinux.cpp:MonitorCallback got exit signal(0x002EA90B) , tid = 25279 (is not main thread)
1522263876.330640793 NativeProcessLinux.cpp:MonitorCallback tid = 25279 handling non-main thread exit (%s)
Anyone else experienced this or know of a fix?
A workaround is to re-install Android Studio 3.0.1. This can be done alongside the latest version (see https://developer.android.com/studio/preview/install-preview.html).
For me, debugging c++ code then works again (in Android Studio 3.0.1) even though it is using the same versions of SDK tools (e.g. LLDB v3.1.4508709).
My PC has crashed occasionally, and after restart I got this, and can't run my project. What do to, who knows?
UPDATED for moderator: this is definitely Android Studio bug, so appropriate tag is important for whose who will search the same. The cause is in Android Studio's .idea file, I assume for now.
Error:Android Source Generator: Error:
java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException at
java.io.ByteArrayInputStream.read(ByteArrayInputStream.java:180) at
com.intellij.util.io.CompressedAppendableFile$SegmentedChunkInputStream.read(CompressedAppendableFile.java:541)
at java.io.DataInputStream.readFully(DataInputStream.java:195) at
com.intellij.util.io.PersistentHashMapValueStorage.readBytes(PersistentHashMapValueStorage.java:401)
at
com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:518)
at
com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:472)
at
org.jetbrains.jps.incremental.storage.AbstractStateStorage.getState(AbstractStateStorage.java:117)
at
org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.runAaptCompiler(AndroidSourceGeneratingBuilder.java:913)
at
org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.doBuild(AndroidSourceGeneratingBuilder.java:210)
at
org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.build(AndroidSourceGeneratingBuilder.java:114)
at
org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1237)
at
org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:911)
at
org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:983)
at
org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:870)
at
org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:696)
at
org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:387)
at
org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:194)
at
org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at
org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:294)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at
org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232)
at
org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
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)
The answer is: delete .idea folder
Or better move it first to somewhere, on the case you forget something from configuration.
Android Studio 2.3.3
I am having an internal IDE error in my android studio. The component properties panel never shows anything. And when I click on a component, there's an error in the event log which says:
IllegalArgumentException: Missing attribute definition for focusable
This is the error details.
Missing attribute definition for focusable
java.lang.IllegalArgumentException: Missing attribute definition for focusable
at com.android.tools.idea.uibuilder.property.NlPropertyItem.<init>(NlPropertyItem.java:88)
at com.android.tools.idea.uibuilder.property.NlPropertyItem.create(NlPropertyItem.java:72)
at com.android.tools.idea.uibuilder.property.NlProperties.getPropertiesWithReadLock(NlProperties.java:111)
at com.android.tools.idea.uibuilder.property.NlProperties.lambda$getProperties$538(NlProperties.java:64)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.uibuilder.property.NlProperties.getProperties(NlProperties.java:63)
at com.android.tools.idea.uibuilder.property.NlPropertiesManager.lambda$setSelectedComponents$202(NlPropertiesManager.java:174)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
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)
My AS IDE is updated (version 2.2.2), I'm also using Oracle JDK (jdk1.8.0_112).
change the compileSdkVersion and targetSdkVersion from 24 to 23, I think it will help you...
It might be the problem with OpenJDK. Please remove it and install Oracle JDK instead using this post: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
Then go to File -> Project Structure and change Java SDK path.
Might it will help you. happy coding.
When I'm using Intellij idea the IDE close without any error ! and when I open it again it returns this error:
Internal error. Please report to http://youtrack.jetbrains.com
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.ClassNotFoundException: com.intellij.idea.MainImpl
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.intellij.idea.MainImpl
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:148)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:86)
... 1 more
How can I resolve this? I'm using Ubuntu 14.0.4
I am using Intellij in Ubuntu too with no errors.
It's hard to say what is happening just by the information provided but I would suggest you to:
1 - Update your Ubuntu with the latest packages
2 - Download the latest version of the IDE, unpack it and try again