编译Gradle时无法找到 android.support.v4 ,即使它已在 build.gradle 中正确声明。
我使用的是android-scala插件,我认为不是这个问题,因为其他各种帖子似乎都有同样的问题。 Intellij在侧栏下显示库:"项目视图",但在编译时,库" android.support.v4 "不可用,也不是在完全编译之后。 我已经尝试了我在StackOverflow上找到的所有建议但没有成功。
非常感谢任何帮助
由于
亚当
错误讯息:
Error:scalac: Error: Class file for android.support.v4.widget.DrawerLayout$LockMode not found
java.lang.AssertionError: Class file for android.support.v4.widget.DrawerLayout$LockMode not found
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$enterOwnInnerClasses$1$$anonfun$12.apply(ClassfileParser.scala:1050)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$enterOwnInnerClasses$1.apply(ClassfileParser.scala:1049)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$enterOwnInnerClasses$1.apply(ClassfileParser.scala:1046)
at scala.collection.mutable.HashMap$$anon$2$$anonfun$foreach$3.apply(HashMap.scala:108)
at scala.collection.mutable.HashMap$$anon$2$$anonfun$foreach$3.apply(HashMap.scala:108)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:230)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap$$anon$2.foreach(HashMap.scala:108)
at scala.tools.nsc.symtab.classfile.ClassfileParser.enterOwnInnerClasses(ClassfileParser.scala:1046)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:457)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:133)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply$mcV$sp(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:212)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1488)
at scala.tools.nsc.GlobalSymbolLoaders.scala$tools$nsc$GlobalSymbolLoaders$$lookup$1(GlobalSymbolLoaders.scala:19)
at scala.tools.nsc.GlobalSymbolLoaders$$anonfun$lookupMemberAtTyperPhaseIfPossible$1.apply(GlobalSymbolLoaders.scala:25)
at scala.tools.nsc.GlobalSymbolLoaders$$anonfun$lookupMemberAtTyperPhaseIfPossible$1.apply(GlobalSymbolLoaders.scala:25)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.GlobalSymbolLoaders.lookupMemberAtTyperPhaseIfPossible(GlobalSymbolLoaders.scala:25)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$classfileParser$.lookupMemberAtTyperPhaseIfPossible(SymbolLoaders.scala:320)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.getMember$1(ClassfileParser.scala:1140)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol(ClassfileParser.scala:1142)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol(ClassfileParser.scala:1131)
at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:406)
at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getClassSymbol(ClassfileParser.scala:225)
at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getSuperClass(ClassfileParser.scala:284)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseParents$1$1$$anonfun$4.apply(ClassfileParser.scala:431)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseParents$1$1$$anonfun$4.apply(ClassfileParser.scala:431)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseParents$1(ClassfileParser.scala:427)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:453)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:133)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply$mcV$sp(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:212)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1488)
at scala.tools.nsc.GlobalSymbolLoaders.scala$tools$nsc$GlobalSymbolLoaders$$lookup$1(GlobalSymbolLoaders.scala:19)
at scala.tools.nsc.GlobalSymbolLoaders$$anonfun$lookupMemberAtTyperPhaseIfPossible$1.apply(GlobalSymbolLoaders.scala:25)
at scala.tools.nsc.GlobalSymbolLoaders$$anonfun$lookupMemberAtTyperPhaseIfPossible$1.apply(GlobalSymbolLoaders.scala:25)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.GlobalSymbolLoaders.lookupMemberAtTyperPhaseIfPossible(GlobalSymbolLoaders.scala:25)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$classfileParser$.lookupMemberAtTyperPhaseIfPossible(SymbolLoaders.scala:320)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.getMember$1(ClassfileParser.scala:1140)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol(ClassfileParser.scala:1142)
at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol(ClassfileParser.scala:1131)
at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:406)
at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getClassSymbol(ClassfileParser.scala:225)
at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getSuperClass(ClassfileParser.scala:284)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseParents$1$1$$anonfun$4.apply(ClassfileParser.scala:431)
at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseParents$1$1$$anonfun$4.apply(ClassfileParser.scala:431)
at scala.collection.immutable.List.map(List.scala:277)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseParents$1(ClassfileParser.scala:427)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:453)
at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:133)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply$mcV$sp(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader$$anonfun$doComplete$2.apply(SymbolLoaders.scala:348)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:348)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:212)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.load(SymbolLoaders.scala:228)
at scala.tools.nsc.typechecker.Typers$Typer.isStale(Typers.scala:496)
at scala.tools.nsc.typechecker.Typers$Typer.reallyExists(Typers.scala:487)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$qualifies$1(Typers.scala:4841)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$105.apply(Typers.scala:4867)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$105.apply(Typers.scala:4867)
at scala.reflect.internal.Symbols$Symbol.filter(Symbols.scala:1916)
at scala.tools.nsc.typechecker.Contexts$Context.lookupImport$1(Contexts.scala:1102)
at scala.tools.nsc.typechecker.Contexts$Context.lookupSymbol(Contexts.scala:1123)
at scala.tools.nsc.typechecker.Typers$Typer.typedIdent$2(Typers.scala:4867)
at scala.tools.nsc.typechecker.Typers$Typer.typedIdentOrWildcard$1(Typers.scala:4905)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5340)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedTypeConstructor(Typers.scala:5532)
at scala.tools.nsc.typechecker.Typers$Typer.typedTypeConstructor(Typers.scala:5549)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedParentType(Typers.scala:1468)
at scala.tools.nsc.typechecker.Typers$Typer.typedParentTypes(Typers.scala:1631)
at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:919)
at scala.tools.nsc.typechecker.Namers$Namer.classSig(Namers.scala:968)
at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1523)
at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1541)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:781)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1568)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:780)
at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:772)
at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1684)
at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1692)
at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1682)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1488)
at scala.reflect.internal.Kinds$$anonfun$checkKindBounds0$2.apply(Kinds.scala:215)
at scala.reflect.internal.Kinds$$anonfun$checkKindBounds0$2.apply(Kinds.scala:211)
at scala.reflect.internal.util.Collections$class.flatMap2(Collections.scala:130)
at scala.reflect.internal.SymbolTable.flatMap2(SymbolTable.scala:16)
at scala.reflect.internal.Kinds$class.checkKindBounds0(Kinds.scala:211)
at scala.reflect.internal.SymbolTable.checkKindBounds0(SymbolTable.scala:16)
at scala.tools.nsc.typechecker.Infer$Inferencer.checkKindBounds(Infer.scala:902)
at scala.tools.nsc.typechecker.Infer$Inferencer.check$1(Infer.scala:893)
at scala.tools.nsc.typechecker.Infer$Inferencer.checkBounds(Infer.scala:898)
at scala.tools.nsc.typechecker.Typers$Typer.typedTypeApply(Typers.scala:3931)
at scala.tools.nsc.typechecker.Typers$Typer.typedTypeApply$1(Typers.scala:5149)
at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5320)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:3163)
at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgWithFormal$1(PatternTypers.scala:112)
at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115)
at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$$anonfun$2.apply(PatternTypers.scala:115)
at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:46)
at scala.runtime.Tuple2Zipped$$anonfun$map$extension$1.apply(Tuple2Zipped.scala:44)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.runtime.Tuple2Zipped$.map$extension(Tuple2Zipped.scala:44)
at scala.tools.nsc.typechecker.PatternTypers$PatternTyper$class.typedArgsForFormals(PatternTypers.scala:115)
at scala.tools.nsc.typechecker.Typers$Typer.typedArgsForFormals(Typers.scala:111)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$handleMonomorphicCall$1(Typers.scala:3469)
at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3494)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$95.apply(Typers.scala:4494)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$95.apply(Typers.scala:4494)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:680)
at scala.tools.nsc.typechecker.Typers$Typer.tryTypedApply$1(Typers.scala:4494)
at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4542)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4578)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5343)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2382)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5317)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5463)
at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2421)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2440)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2439)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2439)
at scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2451)
at scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4309)
at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5322)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5452)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3046)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2381)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedOutsidePatternMode$1$1.apply(Typers.scala:5318)
at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5317)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5463)
at scala.tools.nsc.typechecker.Typers$Typer.typedCase(Typers.scala:2421)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2440)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedCases$1.apply(Typers.scala:2439)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedCases(Typers.scala:2439)
at scala.tools.nsc.typechecker.Typers$Typer.typedMatch(Typers.scala:2451)
at scala.tools.nsc.typechecker.Typers$Typer.typedVirtualizedMatch$1(Typers.scala:4309)
at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:5322)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5353)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5605)
at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2208)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5308)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5452)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3046)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1921)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1762)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5309)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typedByValueExpr(Typers.scala:5452)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:3046)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3150)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3150)
at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5012)
at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5312)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5448)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:441)
at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:432)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:441)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)
at scala.collection.Iterator$class.foreach(Iterator.scala:750)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1500)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1487)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
at scala.tools.nsc.Global$Run.compile(Global.scala:1580)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
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:497)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
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:497)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
我的build.gradle:
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.4"
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
}
apply plugin: "com.android.application"
apply plugin: "jp.leafytree.android-scala"
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.sniff_it.tlock.app"
minSdkVersion 9
targetSdkVersion 22
testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
versionCode 1
versionName "1.0"
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
sourceSets {
main {
scala {
srcDir "src/main/scala"
}
}
androidTest {
scala {
srcDir "src/androidTest/scala"
}
}
}
packagingOptions {
exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:multidex:1.0.1'
compile "org.scala-lang:scala-library:2.11.6"
compile "de.greenrobot:greendao:1.3.7"
compile "de.greenrobot:eventbus:2.4.0"
compile "org.igniterealtime.smack:smack-android-extensions:4.1.0"
compile "org.igniterealtime.smack:smack-tcp:4.1.0"
// compile 'com.android.support:support-v4:22.2.0'
// compile 'com.android.support:gridlayout-v7:22.2.0'
// androidTestCompile "com.android.support:multidex-instrumentation:1.0.1", { exclude module: "multidex" }
//compile "org.igniterealtime.smack:smack-android:4.1.0"
//compile "org.igniterealtime.smack:smack-im:4.1.0"
// compile "de.greenrobot:greendao-generator:1.3.1"
// compile "com.nostra13.universalimageloader:universal-image-loader:1.9.3"
}
tasks.withType(ScalaCompile) {
// If you want to use scala compile daemon
scalaCompileOptions.useCompileDaemon = true
// Suppress deprecation warnings
//scalaCompileOptions.deprecation = false
scalaCompileOptions.additionalParameters = ["-feature"]
}