After updating android sdk, encounter a confused error when building my project.
It is a imported eclipse project, what I did is installed SDK 26 and build-tools 26, uninstalled old SDK 15-18 and build-tools 25.0.2.
I try to reinstall these things, but not work.
Here is the error message:
Error:Internal error: (java.lang.ClassNotFoundException) com.android.prefs.AndroidLocation$AndroidLocationException
java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation$AndroidLocationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:404)
at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:480)
at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:110)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:84)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:267)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$$Lambda$4/71020844.run(Unknown Source)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$$Lambda$2/1522311648.run(Unknown Source)
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)
Related
I previously downloaded Android Studio 4.1 Beta 5 and it was working just fine, but when I launch it today, this error is showing:
Internal error. Please refer to https://code.google.com/p/android/issues
java.util.concurrent.CompletionException: java.lang.AssertionError: Attribute
id='AUTO_DETECTION_CACHE_ATTRIBUTE' is not unique
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1643)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:193)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AssertionError: Attribute id='AUTO_DETECTION_CACHE_ATTRIBUTE' is not unique
at com.intellij.openapi.vfs.newvfs.FileAttribute.<init>(FileAttribute.java:34)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.<init>(FileTypeManagerImpl.java:159)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at.....
-----
JRE 1.8.0_242-release-1644-b01 amd64 by JetBrains s.r.o
C:\Program Files\Android\Android Studio 4.1 Beta\jre\jre
What should I do to solve the issue?
I'm a novice user of Android studio. While I'm using it, an error message has kept coming up. I tried to change the folder's property into the full access by user and administrator as well as other advices here but still error message below pops up.
[IDE Fatal Errors]
C:\Users\hakmin\.AndroidStudio3.1\system\gradle\Projects\ff20177d\project.dat (access is denied)
java.io.FileNotFoundException: C:\Users\hakmin\.AndroidStudio3.1\system\gradle\Projects\ff20177d\project.dat (access is denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectSerializer.save(ExternalProjectSerializer.java:234)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectDataCache.saveExternalProject(ExternalProjectDataCache.java:85)
at org.jetbrains.plugins.gradle.service.project.data.ExternalProjectDataService.importData(ExternalProjectDataService.java:59)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.doImportData(ProjectDataManagerImpl.java:271)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:145)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:221)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:228)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:117)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:94)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:39)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:84)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
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)
Thank you.
I write a project in Android studio 2.3.3, I have JUnit test, also I use Jenkins as CI. My tasks in CI are clean,testDevDebugUnitTest. In past, my tests were working fine. Yesterday I removed folder build from my Android project and after that testDevDebugUnitTest always failed in CI.but In Android studio all is ok.
Stacktrace I am getting is as below:
java.lang.NoClassDefFoundError: android/os/Parcelable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at ru.alfabank.oavdo.amc.base.models.Amount$Parser.parse(Amount.kt:135)
at ru.alfabank.oavdo.amc.base.models.Amount$Parser.parse(Amount.kt:114)
at ru.alfabank.oavdo.amc.base.models.AmountTest.parseTest(AmountTest.kt:78)
Caused by:
java.lang.ClassNotFoundException: android.os.Parcelable
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 15 more
I googled about this and found almost nothing, except that remove gradle folder, but after that project doesn't compile. Maybe anyone met this problem?
Make your model class implements with Serializable.
Just downloaded Android Studio Canary Build: 2.2 Preview 6, on trying to start I get:
Internal Error. Please report to https://code.google.com/p/android/issues
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:96)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
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 com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
... 1 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Layout
at com.intellij.idea.MainImpl.start(MainImpl.java:34)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Layout
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I've googled and not been able to find any fixes.
I'm running Linux Mint Rebecca 17.1 32-bit.
Not sure what other information to provide. Any help is appreciated, thanks.
just install the jdk1.8.0_102 and set JAVA_PATH in your Environment Variable to C:\Program Files\Java\jdk1.8.0_102
I must have messed up installation somehow, after deleting ~/.AndroidStudioPreview1.2/ and ~/.AndroidStudioPreview2.2/ I redownloaded the installation zip and reinstalled. Now it seems to be working.
The first error I had was this:
Android Studio error installing Gradle
And when i fixed that i had a new error:
Internal error: (java.lang.ClassNotFoundException) org.slf4j.LoggerFactory
java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.<clinit>(DefaultToolingImplementationLoader.java:45)
at org.gradle.tooling.internal.consumer.ConnectorServices$ConnectorServiceRegistry.createToolingImplementationLoader(ConnectorServices.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.gradle.internal.service.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:175)
at org.gradle.internal.service.DefaultServiceRegistry.access$300(DefaultServiceRegistry.java:47)
at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.create(DefaultServiceRegistry.java:336)
at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:240)
at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.getService(DefaultServiceRegistry.java:275)
at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.getService(DefaultServiceRegistry.java:215)
at org.gradle.internal.service.DefaultServiceRegistry.doGet(DefaultServiceRegistry.java:145)
at org.gradle.internal.service.AbstractServiceRegistry.get(AbstractServiceRegistry.java:65)
at org.gradle.internal.service.SynchronizedServiceRegistry$1.create(SynchronizedServiceRegistry.java:38)
at org.gradle.internal.concurrent.Synchronizer.synchronize(Synchronizer.java:31)
at org.gradle.internal.service.SynchronizedServiceRegistry.get(SynchronizedServiceRegistry.java:36)
at org.gradle.tooling.internal.consumer.ConnectorServices.createConnector(ConnectorServices.java:36)
at org.gradle.tooling.GradleConnector.newConnector(GradleConnector.java:64)
at com.android.tools.idea.jps.builder.AndroidGradleBuilder.doBuild(AndroidGradleBuilder.java:266)
at com.android.tools.idea.jps.builder.AndroidGradleBuilder.build(AndroidGradleBuilder.java:136)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1051)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:792)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:823)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:755)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:576)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:339)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:180)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:220)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:112)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:132)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
PD: Sorryfor my bad english and the format of the question this is my first question.
I had the same java.lang.ClassNotFoundException exception, trying to include jsoup.
What helped me was opening the terminal, going to the root of the project and executing
gradle clean
gradle assemble