2017-09-24 189 views
0

我“米要学习和混帐有助于穿梭应用:编译和运行应用程序穿梭

https://github.com/timusus/Shuttle

我”米经验的开发人员,但我似乎无法编译该存储库。

使用: Android Studio中3.0测试6

分支dev的

1。当我尝试执行gradle sync时出现此错误:

Warning:One of the plugins you are using supports Java 8 language features. To try the support built into the Android plugin, remove the following from your build.gradle: 
    apply plugin: 'me.tatarka.retrolambda' 
To learn more, go to https://d.android.com/r/tools/java-8-support-message.html 

Error:Failed to resolve: leakcanary-android 

Error:Failed to resolve: recyclerview-fastscroll 

2。使用依赖的方式我不例如了解项目:

compile libs.cardView 
    compile libs.design 
    compile libs.palette 
    compile libs.prefCompat 
    compile libs.prefCompatv14 
    compile libs.recyclerView 
    compile libs.supportv4 
    compile libs.firebaseCore 

据我所知,这里的名字是常数,但何时我看到按键的价值?

+0

1)不使用的Beta 3 ](https://androidstudio.googleblog.com/2017/08/android-studio-30-beta-3-is-now.html)。尽快升级。 2)你需要Java 8(意味着它已经安装)3)添加retrolambda到你的依赖关系,看看它是否有效 – Zoe

+0

谢谢,我使用beta6我错过了写道,retrolambda已经存在于一些库中,我想我支持java 8 –

回答

0

默认情况下,Android Studio 3.0 Beta提供给您使用Android Gradle Plugin 3.0.0的新alpha/beta版本。这些gradle插件支持Java 8功能。 所以,如果你想使用Retrolambda,然后从Shuttle/app/build.gradle删除一个程序段:

// Used to enable Java8 features 
compileOptions { 
    sourceCompatibility JavaVersion.VERSION_1_8 
    targetCompatibility JavaVersion.VERSION_1_8 
} 

或者删除

apply plugin: 'me.tatarka.retrolambda' 

,如果你想使用的gradle从插件的Java 8支持。

宣言leakcanary-的Androidrecyclerview-fastscroll你可以在dependencies.gradle发现:

ext.versions = [ 
    ... 
    leakCanary : "1.5.1", 
    ... 
    fastScroll : "1.0.15", 
    ... 
] 

ext.libs = [ 
    ... 
    fastScroll : "com.simplecityapps:recyclerview-fastscroll:$versions.fastScroll", 
    ... 
    leakCanaryDebug : "com.squareup.leakcanary:leakcanary-android:$versions.leakCanary", 
    leakCanaryRel : "com.squareup.leakcanary:leakcanary-android-no-op:$versions.leakCanary", 
    ... 
]