2015-09-07 52 views
-1

當我們運行android應用程序,然後gradle build每次運行3到5個5 munutes。的build.gradle(模塊的應用程序)是Gradle build在android studio中運行消耗(3到5分鐘)到很多時間

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.1" 

defaultConfig { 
    applicationId "com.sk.followkids" 
    minSdkVersion 15 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
    multiDexEnabled true 
} 

dependencies { 
compile files('libs/Parse-1.10.2.jar') 
compile files('libs/PPNS-1.10.2.jar') 
compile files('libs/ParseFacebookUtilsV4-1.10.2.jar') 
compile project(':facebook') 
apply plugin: 'com.google.gms.google-services' 
compile files('libs/ParseCrashReporting-1.10.2.jar') 
compile 'com.android.support:appcompat-v7:23.1.1' 
compile 'com.android.support:design:23.1.1' 
compile 'com.android.support:support-v4:23.1.1' 
compile 'com.google.android.gms:play-services:8.1.0' 
compile 'com.google.android.gms:play-services-identity:8.1.0' 
compile 'com.google.android.gms:play-services-plus:8.1.0' 
compile 'com.google.android.gms:play-services-gcm:8.1.0' 

}

感謝

+0

這可能有助於https://developers.facebook.com/docs/sharing/android – wadali

+0

我嘗試,但不起作用烏里videoFileUri = ... ShareVideo =新ShareVideo.Builder() .setLocalUrl(videoUrl) 。建立(); ShareVideoContent content = new ShareVideoContent.Builder() .setVideo(video) .build(); –

+0

此處顯示我的代碼 – wadali

回答

1

看看一對docs

正如你可以看到

public View inflate (int resource, ViewGroup root, boolean attachToRoot) 

布爾PARAM這裏它用於添加視圖作爲rootview的子項。

希望這會有所幫助。

+0

感謝您的答案,但什麼是attachToRoot?如果我寫bool true,那麼爲什麼應用程序崩潰。 –

+0

這意味着視圖將被添加到rootView,就像調用addView()一樣。什麼是你的logcat異常?也許你也在調用addView()呢? – Nanoc