2017-01-11 19 views
0

誰かがこれに関する説明を持っていれば、理解してください。Firebaseの依存関係、firebase-crash:10.0.1 '

問題がある:

依存関係に私はこの、

compile 'com.google.firebase:firebase-crash:10.0.1' 

を使用している場合、以下のコードは、レイアウトで、表示されません。

<android.support.v4.view.PagerTabStrip 
       android:id="@+id/pager_header" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_gravity="top" 
       android:background="@color/colorAccent" 
       android:paddingBottom="@dimen/_7dp" 
       android:paddingTop="@dimen/_7dp" 
       android:textAppearance="@style/MyCustomTabTextAppearance" 
       android:textColor="@color/colorWhite" /> 

しかし、私はこのように、firebaseをダウングレードしていた場合、

compile 'com.google.firebase:firebase-crash:9.4.0' 

次に、以下のコードが表示されます。

<android.support.v4.view.PagerTabStrip 
        android:id="@+id/pager_header" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_gravity="top" 
        android:background="@color/colorAccent" 
        android:paddingBottom="@dimen/_7dp" 
        android:paddingTop="@dimen/_7dp" 
        android:textAppearance="@style/MyCustomTabTextAppearance" 
        android:textColor="@color/colorWhite" /> 

これは私のアプリケーションの依存性です。

dependencies { 
     compile fileTree(include: ['*.jar'], dir: 'libs') 
     testCompile 'junit:junit:4.12' 
     compile 'com.android.support:appcompat-v7:23.3.0' 
     compile 'com.android.support:design:23.3.0' 
     compile 'com.android.support:recyclerview-v7:23.3.0' 
     compile 'com.android.support:cardview-v7:23.3.0' 
     compile 'com.squareup.okhttp3:okhttp:3.2.0' 
     compile 'com.nineoldandroids:library:2.4.0' 
     compile 'com.android.support:palette-v7:23.3.0' 
     compile 'io.github.kexanie.library:MathView:0.0.6' 
     compile 'jp.wasabeef:blurry:2.0.2' 
     compile 'com.mcxiaoke.volley:library-aar:1.0.0' 
     compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
      transitive = true; 
     } 
     compile 'com.google.firebase:firebase-crash:10.0.1' 
    } 
    apply plugin: 'com.google.gms.google-services' 

これは私のプロジェクトの依存関係です。

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.2' 
     classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1' 
     classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' 
     classpath 'com.google.gms:google-services:3.0.0' 
     classpath 'com.google.firebase:firebase-plugins:1.0.4' 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
+0

@Shekarあなたのgradle依存関係を投稿してください –

+0

私は依存関係を貼り付けました。 – Shekhar

+0

Sagar-Gangawane、私はこれに対する解決策を見つけました。親切にこれをチェックしてください。 – Shekhar

答えて

0

私はこの問題を解決しました。

MainActivityでは、このようにPagerTabStripを初期化します。心に留めておくべき

PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.pager_header); 

((ViewPager.LayoutParams) pagerTabStrip.getLayoutParams()).isDecor = true; 

ことの一つは、それがStudioのレイアウトのプレビューに影響を示さないということです。しかし、実行すると、デバイスに正しい出力が表示されます。