Load previous android Project fails - android

I've set up new windows os: 10
after installing android studio and create a new one it works well but when trying to open existing project I get an error with
A problem occurred configuring project ':app'.
I've made sure that the old project has the same gradle configs as the new one.
can anyone help?
this is the exception I get
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
at com.android.build.gradle.internal.ndk.NdkHandler.getPlatformVersion(NdkHandler.java:158)
at com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits(NdkHandler.java:331)
at com.android.build.gradle.internal.ndk.NdkHandler.getDefaultAbis(NdkHandler.java:412)
at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create(ExternalNativeJsonGenerator.java:736)
at com.android.build.gradle.internal.TaskManager.createExternalNativeBuildJsonGenerators(TaskManager.java:1711)
at com.android.build.gradle.internal.ApplicationTaskManager.lambda$createTasksForVariantScope$10(ApplicationTaskManager.java:210)
at com.android.build.gradle.internal.ApplicationTaskManager$$Lambda$205/636103725.call(Unknown Source)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope(ApplicationTaskManager.java:205)
at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:530)
at com.android.build.gradle.internal.VariantManager.lambda$createAndroidTasks$1(VariantManager.java:352)
at com.android.build.gradle.internal.VariantManager$$Lambda$145/195502090.call(Unknown Source)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:348)
at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:751)
at com.android.build.gradle.BasePlugin$$Lambda$103/1684325025.call(Unknown Source)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:746)
at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:652)
at com.android.build.gradle.BasePlugin$$Lambda$79/338632383.call(Unknown Source)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:648)
Update 1: the old project contains dependencies like retrofit
Update 2: I've installed Android SDK and android project in partition E

Related

Android studio Kotlin plugin crashes constantly

I constantly get exceptions while opening and editing files in my Android Studio project from the Kotlin plugin. There is a notification saying
IDE Error Occured
and when I click on it it takes me to the "IDE fatal errors" reporting tool where it says:
Exception in Studio core
The error message is the following:
Kotlin resolution encountered a problem while analyzing KtCallExpression
org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtCallExpression
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:37)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyze(resolutionApi.kt:112)
at org.jetbrains.kotlin.idea.parameterInfo.ArgumentNameHintsKt.provideArgumentNameHints(ArgumentNameHints.kt:26)
at org.jetbrains.kotlin.idea.parameterInfo.HintType$PARAMETER_HINT.provideHints(KotlinInlayParameterHintsProvider.kt:78)
at org.jetbrains.kotlin.idea.parameterInfo.KotlinInlayParameterHintsProvider.getParameterHints(KotlinInlayParameterHintsProvider.kt:161)
at com.intellij.codeInsight.hints.ParameterHintsPass.process(ParameterHintsPass.java:84)
at com.intellij.codeInsight.hints.ParameterHintsPass.lambda$doCollectInformation$0(ParameterHintsPass.java:76)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.intellij.codeInsight.hints.ParameterHintsPass.doCollectInformation(ParameterHintsPass.java:76)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:437)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:430)
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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:429)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:405)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:218)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.AssertionError: Recursion detected on input: onCreate under LockBasedStorageManager#42a2e9fb (<unknown creating class>)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.computeDescriptorsFromDeclaredElements(AbstractLazyMemberScope.kt:195)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$descriptorsFromDeclaredElements$1.invoke(LazyClassMemberScope.kt:54)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$descriptorsFromDeclaredElements$1.invoke(LazyClassMemberScope.kt:46)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:354)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:410)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedDescriptors(LazyClassMemberScope.kt:68)
at org.jetbrains.kotlin.resolve.DescriptorUtils.getAllDescriptors(DescriptorUtils.java:593)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.resolveMemberHeaders(LazyClassDescriptor.java:573)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.doForceResolveAllContents(LazyClassDescriptor.java:543)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.lambda$new$4(LazyClassDescriptor.java:221)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:354)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.forceResolveAllContents(LazyClassDescriptor.java:539)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.doForceResolveAllContents(ForceResolveUtil.java:75)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:41)
at org.jetbrains.kotlin.idea.caches.lightClasses.IDELightClassContexts.contextForNonLocalClassOrObject(IDELightClassContexts.kt:105)
at org.jetbrains.kotlin.idea.caches.resolve.IDELightClassGenerationSupport$createDataHolderForClass$3.invoke(IDELightClassGenerationSupport.kt:49)
at org.jetbrains.kotlin.idea.caches.resolve.IDELightClassGenerationSupport$createDataHolderForClass$3.invoke(IDELightClassGenerationSupport.kt:35)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$exactResultLazyValue$1.invoke(LazyLightClassDataHolder.kt:46)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$exactResultLazyValue$1.invoke(LazyLightClassDataHolder.kt:32)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder.getJavaFileStub(LazyLightClassDataHolder.kt)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData$clsDelegate$2.invoke(LazyLightClassDataHolder.kt:103)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData$clsDelegate$2.invoke(LazyLightClassDataHolder.kt:100)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData.getClsDelegate(LazyLightClassDataHolder.kt)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass$clsDelegate$2.invoke(KtLazyLightClass.kt:26)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass$clsDelegate$2.invoke(KtLazyLightClass.kt:23)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass.getClsDelegate(KtLazyLightClass.kt)
at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.getSuperTypes(KtLightClassForSourceDeclaration.kt:427)
at com.intellij.psi.impl.ScopedClassHierarchy.calcImmediateSupersWithCapturing(ScopedClassHierarchy.java:163)
at com.intellij.psi.impl.ScopedClassHierarchy.lambda$getImmediateSupersWithCapturing$2(ScopedClassHierarchy.java:148)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.ScopedClassHierarchy.getImmediateSupersWithCapturing(ScopedClassHierarchy.java:148)
at com.intellij.psi.impl.PsiClassImplUtil.getScopeCorrectedSuperTypes(PsiClassImplUtil.java:740)
at com.intellij.psi.impl.PsiClassImplUtil.processSuperTypes(PsiClassImplUtil.java:750)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClassNotCached(PsiClassImplUtil.java:724)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:479)
at com.intellij.psi.impl.PsiClassImplUtil.lambda$processDeclarationsInClassNotCached$2(PsiClassImplUtil.java:725)
at com.intellij.psi.impl.PsiClassImplUtil.processSuperTypes(PsiClassImplUtil.java:755)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClassNotCached(PsiClassImplUtil.java:724)
at com.intellij.psi.impl.PsiClassImplUtil.lambda$createMembersMap$1(PsiClassImplUtil.java:406)
at com.intellij.util.containers.ConcurrentFactoryMap$4.create(ConcurrentFactoryMap.java:224)
at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:63)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.get(PsiClassImplUtil.java:359)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.access$000(PsiClassImplUtil.java:351)
at com.intellij.psi.impl.PsiClassImplUtil.processCachedMembersByName(PsiClassImplUtil.java:558)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:476)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:453)
at com.intellij.psi.impl.source.PsiClassImpl.processDeclarations(PsiClassImpl.java:488)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl$OurGenericsResolver.resolve(PsiImportStaticReferenceElementImpl.java:238)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl$OurGenericsResolver.resolve(PsiImportStaticReferenceElementImpl.java:227)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$0(ResolveCache.java:152)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:151)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:182)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl.multiResolve(PsiImportStaticReferenceElementImpl.java:223)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarationsNoGuess(PsiJavaFileBaseImpl.java:377)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarations(PsiJavaFileBaseImpl.java:312)
at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:69)
at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:51)
at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:218)
at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:149)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.resolve(PsiJavaCodeReferenceElementImpl.java:492)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.access$100(PsiJavaCodeReferenceElementImpl.java:47)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:373)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:365)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:205)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:204)
at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:724)
at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:715)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.multiResolve(PsiJavaCodeReferenceElementImpl.java:424)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.advancedResolve(PsiJavaCodeReferenceElementImpl.java:417)
at com.intellij.psi.impl.source.PsiClassReferenceType.resolveGenerics(PsiClassReferenceType.java:191)
at org.jetbrains.kotlin.load.java.structure.impl.JavaClassifierTypeImpl.resolve(JavaClassifierTypeImpl.java:63)
at org.jetbrains.kotlin.load.java.structure.impl.JavaClassifierTypeImpl.isRaw(JavaClassifierTypeImpl.java:86)
at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaClassifierType(JavaTypeResolver.kt:88)
at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaType(JavaTypeResolver.kt:52)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.resolveValueParameters(LazyJavaScope.kt:189)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.resolveMethodToFunctionDescriptor(LazyJavaScope.kt:126)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope$functions$1.invoke(LazyJavaScope.kt:85)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope$functions$1.invoke(LazyJavaScope.kt:55)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.getContributedFunctions(LazyJavaScope.kt:242)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassMemberScope.getContributedFunctions(LazyJavaClassMemberScope.kt:725)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getNonDeclaredFunctions(LazyClassMemberScope.kt:203)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetFunctions(AbstractLazyMemberScope.kt:109)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetFunctions(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:50)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getNonDeclaredFunctions(LazyClassMemberScope.kt:203)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetFunctions(AbstractLazyMemberScope.kt:109)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetFunctions(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:50)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:125)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:94)
at org.jetbrains.kotlin.psi.KtNamedFunction.accept(KtNamedFunction.java:49)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:94)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:91)
at org.jetbrains.kotlin.resolve.lazy.ResolveSession.resolveToDescriptor(ResolveSession.java:330)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.functionAdditionalResolve(ResolveElementCache.kt:589)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.performElementAdditionalResolve(ResolveElementCache.kt:317)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.getElementsAdditionalResolve(ResolveElementCache.kt:178)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElements(ResolveElementCache.kt:222)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:59)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:53)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:38)
... 25 more
What could be the reason for this?
File -> Invalidate Caches did the trick for me

Could not get unknown property 'manifestFile'

in Android studio gradle versions
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-4.5-20171123235935+0000-all.zip
classpath 'com.android.tools.build:gradle:3.1.0-alpha04'
its getting this error
Error:Could not get unknown property 'manifestFile' for task ':backend:generateDebugRFile' of type com.android.build.gradle.internal.res.GenerateLibraryRFileTask.
Trying to change gradle, Studio version etc no affect
First off, regular caveats about using pre-release (alpha) software apply: if you don't need to use the alpha for any particular reason, consider using the stable versions instead. Right now that means
Android Studio 3.0.1
Android Gradle Plugin 3.0.1 (a.k.a. com.android.tools.build:gradle:3.0.1)
With that out of the way....it could be that the 3.1.0-alpha04 plugin removed support for manifestFile, and some other plugin you're using still depends on that. After all, the tools team did remove the similarly-named manifestOutputFile in 3.0.
I tried building a project with
Gradle dist 4.4-rc-3
Android Gradle plugin 3.1.0-alpha04
Fabric Gradle plugin 1.25.0
that applied the fabric plugin and got an error message that looks a lot like the one you posted:
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'manifestFile' for task ':libs:generateProdDebugRFile' of type com.android.build.gradle.internal.res.GenerateLibraryRFileTask.
at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:83)
at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:61)
at com.android.build.gradle.internal.res.GenerateLibraryRFileTask_Decorated.getProperty(Unknown Source)
at com.crashlytics.tools.gradle.CrashlyticsPlugin.addPluginTasks(CrashlyticsPlugin.groovy:239)
at com.crashlytics.tools.gradle.CrashlyticsPlugin.this$2$addPluginTasks(CrashlyticsPlugin.groovy)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at com.crashlytics.tools.gradle.CrashlyticsPlugin$_addPluginTasksToLibraryVariantsIn_closure4.doCall(CrashlyticsPlugin.groovy:122)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106)
at org.gradle.util.ConfigureUtil$1.execute(ConfigureUtil.java:123)
at org.gradle.internal.ImmutableActionSet$SingletonSet.execute(ImmutableActionSet.java:155)
at org.gradle.internal.MutableActionSet.execute(MutableActionSet.java:35)
at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:204)
at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:198)
at com.android.build.gradle.LibraryExtension.addVariant(LibraryExtension.java:90)
at com.android.build.gradle.FeatureExtension.addVariant(FeatureExtension.java:108)
at com.android.build.gradle.internal.ApiObjectFactory.create(ApiObjectFactory.java:132)
at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:709)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:695)
at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:613)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:609)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy26.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76)
... 81 more
Had a similar problem with Crashlytics integration and found that I needed to add
crashlytics { instantAppSupport true }
This was needed even though I am not using Instant Apps.
Found from this answer in SO

Migration to Gradle plugin v.1.1.2 caused failing lint checks

My team recently decided to use newly announced unit-testing integration in Android studio, which requires upgrading Gradle plugin version to 1.1.0 or higher. But this update caused failing of Lint task for one of our modules, with very weird error. Can anyone give an idea what might be a problem here?
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2459
at org.eclipse.jdt.internal.compiler.lookup.TypeSystem.getUnannotatedType(TypeSystem.java:82)
at org.eclipse.jdt.internal.compiler.lookup.TypeSystem.getParameterizedType(TypeSystem.java:138)
at org.eclipse.jdt.internal.compiler.lookup.TypeSystem.getParameterizedType(TypeSystem.java:172)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createParameterizedType(LookupEnvironment.java:946)
at org.eclipse.jdt.internal.compiler.lookup.Scope$Substitutor.substitute(Scope.java:511)
at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:435)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.superclass(ParameterizedTypeBinding.java:1212)
at com.android.tools.lint.EcjParser$EcjResolvedClass.isSubclassOf(EcjParser.java:1025)
at com.android.tools.lint.checks.CleanupDetector.checkResourceRecycled(CleanupDetector.java:219)
at com.android.tools.lint.checks.CleanupDetector.visitMethod(CleanupDetector.java:180)
at com.android.tools.lint.client.api.JavaVisitor$DelegatingJavaVisitor.visitMethodInvocation(JavaVisitor.java:1314)
at lombok.ast.MethodInvocation.accept(MethodInvocation.java:114)
at lombok.ast.BinaryExpression.accept(BinaryExpression.java:131)
at lombok.ast.ExpressionStatement.accept(ExpressionStatement.java:63)
at lombok.ast.Block.accept(Block.java:106)
at lombok.ast.Try.accept(Try.java:107)
at lombok.ast.Block.accept(Block.java:106)
at lombok.ast.MethodDeclaration.accept(MethodDeclaration.java:240)
at lombok.ast.NormalTypeBody.accept(NormalTypeBody.java:57)
at lombok.ast.ClassDeclaration.accept(ClassDeclaration.java:239)
at lombok.ast.NormalTypeBody.accept(NormalTypeBody.java:57)
at lombok.ast.ClassDeclaration.accept(ClassDeclaration.java:239)
at lombok.ast.CompilationUnit.accept(CompilationUnit.java:83)
at com.android.tools.lint.client.api.JavaVisitor.visitFile(JavaVisitor.java:263)
at com.android.tools.lint.client.api.LintDriver.checkJava(LintDriver.java:1491)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:1026)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:882)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:433)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:374)
at com.android.tools.lint.LintCliClient.run(LintCliClient.java:130)
at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:112)
at com.android.build.gradle.internal.LintGradleClient$run.call(Unknown Source)
at com.android.build.gradle.tasks.Lint.runLint(Lint.groovy:198)
at com.android.build.gradle.tasks.Lint.this$4$runLint(Lint.groovy)
at com.android.build.gradle.tasks.Lint$this$4$runLint$1.callCurrent(Unknown Source)
at com.android.build.gradle.tasks.Lint.lintSingleVariant(Lint.groovy:173)
at com.android.build.gradle.tasks.Lint$lintSingleVariant$0.callCurrent(Unknown Source)
at com.android.build.gradle.tasks.Lint.lint(Lint.groovy:75)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more

How to download android gradle project dependencies to custom folder?

How to download android gradle project dependencies to custom folder?
I cannot save or read *.exe files in my home folder in my work enviroment under Windows (due security reason and corporate policy)
How to resolve exception thrown by gradle when I try to build or import in IDE Android project?
I tried to change Gradle user home, but it didn't help.
Caused by: java.io.FileNotFoundException: \\{my-company-url-for-user-home}\android-sdk-windows\SDK Manager.exe (Access is denied)
at org.rauschig.jarchivelib.IOUtils.copy(IOUtils.java:50)
at org.rauschig.jarchivelib.CommonsArchiver.extract(CommonsArchiver.java:83)
at org.rauschig.jarchivelib.Archiver$extract.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkDownload.download(SdkDownload.groovy:57)
at com.jakewharton.sdkmanager.internal.SdkDownload$download$0.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.Downloader$Real.download(Downloader.groovy:8)
at com.jakewharton.sdkmanager.internal.Downloader$download.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.downloadSdk(SdkResolver.groovy:95)
at com.jakewharton.sdkmanager.internal.SdkResolver$downloadSdk$1.callCurrent(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.resolve(SdkResolver.groovy:87)
at com.jakewharton.sdkmanager.internal.SdkResolver$resolve$0.call(Unknown Source)
at com.jakewharton.sdkmanager.internal.SdkResolver.resolve(SdkResolver.groovy:17)
at com.jakewharton.sdkmanager.internal.SdkResolver$resolve.call(Unknown Source)
at com.jakewharton.sdkmanager.SdkManagerPlugin$_apply_closure1.doCall(SdkManagerPlugin.groovy:27)
at com.jakewharton.sdkmanager.SdkManagerPlugin$_apply_closure1.doCall(SdkManagerPlugin.groovy)
at com.jakewharton.sdkmanager.SdkManagerPlugin.time(SdkManagerPlugin.groovy:45)
at com.jakewharton.sdkmanager.SdkManagerPlugin$time$0.callCurrent(Unknown Source)
at com.jakewharton.sdkmanager.SdkManagerPlugin.apply(SdkManagerPlugin.groovy:26)
at com.jakewharton.sdkmanager.SdkManagerPlugin.apply(SdkManagerPlugin.groovy)
at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:110)
at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:69)
at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:35)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:117)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:85)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:130)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:41)
at org.gradle.api.Project$apply$2.call(Unknown Source)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_1nbccshuhk647b9aqa26vge5lo.run(C:\Projects\Android\core\build.gradle:1)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
... 54 more
To gather all the dependencies, you can just “copy” the configuration that represents the dependencies you want.
For example, to copy all the compile time and runtime dependencies you could do something like:
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}
you can also use gradle.user.home system property property or --gradle-user-home command line property
I found solution while reading debug logs:
Set up ANDROID_HOME enviroment variable
13:18:32.382 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkResolver] Missing l
ocal.properties.
13:18:32.395 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkResolver] Missing A
NDROID_HOME.
13:18:32.406 [LIFECYCLE] [com.jakewharton.sdkmanager.internal.SdkResolver] Andro
id SDK not found. Downloading...
13:18:32.425 [DEBUG] [com.jakewharton.sdkmanager.internal.SdkDownload] Downloadi
ng SDK from http://dl.google.com/android/android-sdk_r23-windows.zip.

Error when building with Android Annotations

I'm using the guide here to integrate Android Annotations in my Eclipse project (no Maven). I've got the latest ADT running, and tried cleaning my project, double checking build paths and order/export, and turning annotations on and off, but whenever I add the Android Annotations jar to the entries under Java Compiler > Annotation Processing > Factory Path in Eclipse, I get this error:
Error
Mon Jul 15 18:01:05 PDT 2013
Errors running builder 'Java Builder' on project 'Shopping'.
java.lang.NoClassDefFoundError: org/androidannotations/annotations/EActivity
at org.androidannotations.AndroidAnnotationProcessor.getSupportedAnnotationTypes(AndroidAnnotationProcessor.java:601)
at org.eclipse.jdt.internal.compiler.apt.dispatch.ProcessorInfo.<init>(ProcessorInfo.java:58)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.discoverNextProcessor(IdeAnnotationProcessorManager.java:94)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:116)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:394)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
at org.eclipse.core.internal.resources.Project.build(Project.java:114)
at org.eclipse.jdt.internal.ui.util.CoreUtility$BuildJob.run(CoreUtility.java:161)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: org.androidannotations.annotations.EActivity
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 29 more
Anyone have a fix?
You might have copied the wrong of the 2 jars. Please check carefully, where you place the one with and without "api" in the name (as given on the configuration page).
Besides that I guess you have checked all steps from the trouble shooting section.
It turned out to be a bug with my snapshot of Android Annotations. Reverting to the stable 2.7.1 works!

Categories

Resources