2017-09-24 43 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", 
    ... 
]