2016-11-29 8 views
0

私は最近Android Studioをバージョン2.2.2にアップデートしましたが、アプリケーション名がマニフェストで認識されなくなりました。私はまた、hereに位置ドキュメントに基づいて、新しいFirebase SDKに移行:2.2.2のアップデートでAndroid Studioがアプリケーション名を認識しない

enter image description here

私が原因の正確わかりませんが、このエラーに関連する部品の一つであるとしてmultidexingについて読んでてきました。また、私はまた、問題に関連すると考えて、以下の実行時エラー受けています:ここで Build.Gradle

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 24 
buildToolsVersion '25.0.1' 


defaultConfig { 
    vectorDrawables.useSupportLibrary = true 
    applicationId "com.troychuinard.fanpolls" 
    minSdkVersion 16 
    targetSdkVersion 24 
    multiDexEnabled true 
    versionCode 1 
    versionName "1.0" 
} 


buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

packagingOptions { 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/LICENSE-FIREBASE.txt' 
    exclude 'META-INF/NOTICE' 
    } 
} 
repositories { 
maven { url "https://jitpack.io" } 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
compile 'com.google.firebase:firebase-core:9.6.1' 
compile 'com.google.firebase:firebase-database:9.6.1' 
compile 'com.google.firebase:firebase-auth:9.6.1' 
compile 'jp.wasabeef:recyclerview-animators:2.2.3' 
compile 'com.github.clans:fab:1.6.2' 
compile 'de.hdodenhof:circleimageview:2.0.0' 
compile 'com.android.support:cardview-v7:24.1.1' 
compile 'com.android.support:appcompat-v7:24.1.1' 
compile 'com.android.support:recyclerview-v7:24.1.1' 
compile 'com.android.support:design:24.1.1' 
compile 'com.jakewharton:butterknife:7.0.1' 
compile 'com.facebook.android:facebook-android-sdk:4.6.0' 
compile 'com.google.android.gms:play-services-auth:9.6.1' 
compile 'org.twitter4j:twitter4j-core:4.0.2' 
compile 'com.android.support:support-v4:24.1.1' 
compile 'com.squareup.picasso:picasso:2.5.2' 
compile 'com.squareup.okhttp3:okhttp:3.1.2' 
compile 'com.github.PhilJay:MPAndroidChart:v2.2.2' 
compile 'com.google.android.gms:play-services-appindexing:9.6.1' 
compile 'com.google.code.gson:gson:2.6.2' 
compile 'com.squareup.retrofit2:retrofit:2.1.0' 
compile 'com.squareup.retrofit2:converter-gson:2.1.0' 
compile 'com.squareup.okhttp3:logging-interceptor:3.3.0' 
compile 'com.android.support:multidex:1.0.1' 
} 

apply plugin: 'com.google.gms.google-services' 

--------- beginning of crash 
11-28 20:29:06.313 10163-10163/com.troychuinard.fanpolls E/AndroidRuntime: FATAL EXCEPTION: main 
     Process: com.troychuinard.fanpolls, PID: 10163 
     java.lang.RuntimeException: Unable to instantiate application com.troychuinard.fanpolls.FanPollsApplication: java.lang.ClassNotFoundException: Didn't find class "com.troychuinard.fanpolls.FanPollsApplication" on path: DexPathList[[zip file "/data/app/com.troychuinard.fanpolls-1/base.apk"],nativeLibraryDirectories=[/data/app/com.troychuinard.fanpolls-1/lib/x86, /vendor/lib, /system/lib]] 
     at android.app.LoadedApk.makeApplication(LoadedApk.java:578) 
     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680) 
     at android.app.ActivityThread.-wrap1(ActivityThread.java) 
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) 
     at android.os.Handler.dispatchMessage(Handler.java:102) 
     at android.os.Looper.loop(Looper.java:148) 
     at android.app.ActivityThread.main(ActivityThread.java:5417) 
     at java.lang.reflect.Method.invoke(Native Method) 
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.troychuinard.fanpolls.FanPollsApplication" on path: DexPathList[[zip file "/data/app/com.troychuinard.fanpolls-1/base.apk"],nativeLibraryDirectories=[/data/app/com.troychuinard.fanpolls-1/lib/x86, /vendor/lib, /system/lib]] 
     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 
     at android.app.Instrumentation.newApplication(Instrumentation.java:981) 
     at android.app.LoadedApk.makeApplication(LoadedApk.java:573) 
     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)  
     at android.app.ActivityThread.-wrap1(ActivityThread.java)  
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)  
     at android.os.Handler.dispatchMessage(Handler.java:102)  
     at android.os.Looper.loop(Looper.java:148)  
     at android.app.ActivityThread.main(ActivityThread.java:5417)  
     at java.lang.reflect.Method.invoke(Native Method)  
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)  
     Suppressed: java.lang.ClassNotFoundException: com.troychuinard.fanpolls.FanPollsApplication 
     at java.lang.Class.classForName(Native Method) 
     at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 
     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 
      ... 12 more 
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 

を私のディレクトリ構造です:

enter image description here

何か助けやアドバイスをいただければ幸いです!

+1

は、あなたが/クリーンプロジェクトまたは無効化キャッシュ/再起動を再構築しようとしたことがありますか? – TheAnonymous010

+0

私は数回のクリーニング/再構築を試みましたが、無効にするキャッシュは実際に何をしますか? – tccpg288

+0

minifyEnabled falseをtrueに変更します。プロジェクトを清掃し、再構築して確認します。 –

答えて

1

については、このリンクをたどる必要があります。代わりに標準android.app.Applicationが使用されます。

+0

私はそれがなぜ以前に問題なく走ったのか分かりませんし、名前属性を削除しない限りうまくいきません – tccpg288

1

あなたはクラスcom.troychuinard.fanpolls.FanPollsApplicationを持っていないとして、単に属性name='.FanPollsApplication'を削除し、私はあなたがfirebaseを追加するときに、あなたのアプリケーションは、64K以上の方法だと思うし、あなたがMultiDex

https://developer.android.com/studio/build/multidex.html

関連する問題