2014-04-11 35 views
7

Ben Android Studio kullanarak bir uygulama geliştiriyorum, ve hata ayıklama sürümü 10 sürüm varyantı, devre dışı bırakmaya başladı. Hata ayıkken hiç bir şey olmaz. Asıl sorun, her referansın yeniden adlandırıldığı gibi, gerçek hatanın nerede olduğunu bulamıyorum.Hata ayıklama üzerinde uygulama, hata ayıklama sırasında değil

Böyle bir hatayla karşılaştınız mı, sadece sürümü sürümünde neler oldu?

04-11 08:28:42.756 5997-5997/com.korcholis.clothio E/ActivityThread﹕ Failed to inflate 
    android.view.InflateException: Binary XML file line #10: Error inflating class fragment 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713) 
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
      at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
      at android.app.Activity.setContentView(Activity.java:1906) 
      at android.support.v7.a.g.a(Unknown Source) 
      at android.support.v7.a.n.a(Unknown Source) 
      at android.support.v7.a.g.setContentView(Unknown Source) 
      at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
      at android.app.Activity.performCreate(Activity.java:5207) 
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
      at android.app.ActivityThread.access$600(ActivityThread.java:156) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
      at android.os.Handler.dispatchMessage(Handler.java:99) 
      at android.os.Looper.loop(Looper.java:137) 
      at android.app.ActivityThread.main(ActivityThread.java:5303) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:525) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
      at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.IllegalStateException: Could not find constructor that hast just a (Context) argument for helper class class com.korcholis.clothio.b.c 
      at com.a.a.a.a.a.c(Unknown Source) 
      at com.a.a.a.a.a.b(Unknown Source) 
      at com.a.a.a.a.a.a(Unknown Source) 
      at com.korcholis.clothio.fragments.SampleListFragment.a(Unknown Source) 
      at android.support.v4.app.Fragment.i(Unknown Source) 
      at android.support.v4.app.ae.a(Unknown Source) 
      at android.support.v4.app.ae.b(Unknown Source) 
      at android.support.v4.app.ae.a(Unknown Source) 
      at android.support.v4.app.w.onCreateView(Unknown Source) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
            at android.app.Activity.setContentView(Activity.java:1906) 
            at android.support.v7.a.g.a(Unknown Source) 
            at android.support.v7.a.n.a(Unknown Source) 
            at android.support.v7.a.g.setContentView(Unknown Source) 
            at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
            at android.app.Activity.performCreate(Activity.java:5207) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
            at android.app.ActivityThread.access$600(ActivityThread.java:156) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
            at android.os.Handler.dispatchMessage(Handler.java:99) 
            at android.os.Looper.loop(Looper.java:137) 
            at android.app.ActivityThread.main(ActivityThread.java:5303) 
            at java.lang.reflect.Method.invokeNative(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:525) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
            at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context] 
      at java.lang.Class.getConstructorOrMethod(Class.java:423) 
      at java.lang.Class.getConstructor(Class.java:397) 
            at com.a.a.a.a.a.c(Unknown Source) 
            at com.a.a.a.a.a.b(Unknown Source) 
            at com.a.a.a.a.a.a(Unknown Source) 
            at com.korcholis.clothio.fragments.SampleListFragment.a(Unknown Source) 
            at android.support.v4.app.Fragment.i(Unknown Source) 
            at android.support.v4.app.ae.a(Unknown Source) 
            at android.support.v4.app.ae.b(Unknown Source) 
            at android.support.v4.app.ae.a(Unknown Source) 
            at android.support.v4.app.w.onCreateView(Unknown Source) 
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
            at android.app.Activity.setContentView(Activity.java:1906) 
            at android.support.v7.a.g.a(Unknown Source) 
            at android.support.v7.a.n.a(Unknown Source) 
            at android.support.v7.a.g.setContentView(Unknown Source) 
            at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
            at android.app.Activity.performCreate(Activity.java:5207) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
            at android.app.ActivityThread.access$600(ActivityThread.java:156) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
            at android.os.Handler.dispatchMessage(Handler.java:99) 
            at android.os.Looper.loop(Looper.java:137) 
            at android.app.ActivityThread.main(ActivityThread.java:5303) 
            at java.lang.reflect.Method.invokeNative(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:525) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
            at dalvik.system.NativeStart.main(Native Method) 
04-11 08:28:42.756 5997-5997/com.korcholis.clothio D/AndroidRuntime﹕ Shutting down VM 
04-11 08:28:42.756 5997-5997/com.korcholis.clothio W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41902700) 
04-11 08:28:42.756 5997-5997/com.korcholis.clothio E/AndroidRuntime﹕ FATAL EXCEPTION: main 
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.korcholis.clothio/com.korcholis.clothio.SampleListActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class fragment 
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2355) 
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
      at android.app.ActivityThread.access$600(ActivityThread.java:156) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
      at android.os.Handler.dispatchMessage(Handler.java:99) 
      at android.os.Looper.loop(Looper.java:137) 
      at android.app.ActivityThread.main(ActivityThread.java:5303) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:525) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
      at dalvik.system.NativeStart.main(Native Method) 
    Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class fragment 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713) 
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
      at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
      at android.app.Activity.setContentView(Activity.java:1906) 
      at android.support.v7.a.g.a(Unknown Source) 
      at android.support.v7.a.n.a(Unknown Source) 
      at android.support.v7.a.g.setContentView(Unknown Source) 
      at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
      at android.app.Activity.performCreate(Activity.java:5207) 
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
            at android.app.ActivityThread.access$600(ActivityThread.java:156) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
            at android.os.Handler.dispatchMessage(Handler.java:99) 
            at android.os.Looper.loop(Looper.java:137) 
            at android.app.ActivityThread.main(ActivityThread.java:5303) 
            at java.lang.reflect.Method.invokeNative(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:525) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
            at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.IllegalStateException: Could not find constructor that hast just a (Context) argument for helper class class com.korcholis.clothio.b.c 
      at com.a.a.a.a.a.c(Unknown Source) 
      at com.a.a.a.a.a.b(Unknown Source) 
      at com.a.a.a.a.a.a(Unknown Source) 
      at com.korcholis.clothio.fragments.SampleListFragment.a(Unknown Source) 
      at android.support.v4.app.Fragment.i(Unknown Source) 
      at android.support.v4.app.ae.a(Unknown Source) 
      at android.support.v4.app.ae.b(Unknown Source) 
      at android.support.v4.app.ae.a(Unknown Source) 
      at android.support.v4.app.w.onCreateView(Unknown Source) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
            at android.app.Activity.setContentView(Activity.java:1906) 
            at android.support.v7.a.g.a(Unknown Source) 
            at android.support.v7.a.n.a(Unknown Source) 
            at android.support.v7.a.g.setContentView(Unknown Source) 
            at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
            at android.app.Activity.performCreate(Activity.java:5207) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
            at android.app.ActivityThread.access$600(ActivityThread.java:156) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
            at android.os.Handler.dispatchMessage(Handler.java:99) 
            at android.os.Looper.loop(Looper.java:137) 
            at android.app.ActivityThread.main(ActivityThread.java:5303) 
            at java.lang.reflect.Method.invokeNative(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:525) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
            at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context] 
      at java.lang.Class.getConstructorOrMethod(Class.java:423) 
      at java.lang.Class.getConstructor(Class.java:397) 
            at com.a.a.a.a.a.c(Unknown Source) 
            at com.a.a.a.a.a.b(Unknown Source) 
            at com.a.a.a.a.a.a(Unknown Source) 
            at com.korcholis.clothio.fragments.SampleListFragment.a(Unknown Source) 
            at android.support.v4.app.Fragment.i(Unknown Source) 
            at android.support.v4.app.ae.a(Unknown Source) 
            at android.support.v4.app.ae.b(Unknown Source) 
            at android.support.v4.app.ae.a(Unknown Source) 
            at android.support.v4.app.w.onCreateView(Unknown Source) 
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 
            at android.app.Activity.setContentView(Activity.java:1906) 
            at android.support.v7.a.g.a(Unknown Source) 
            at android.support.v7.a.n.a(Unknown Source) 
            at android.support.v7.a.g.setContentView(Unknown Source) 
            at com.korcholis.clothio.SampleListActivity.onCreate(Unknown Source) 
            at android.app.Activity.performCreate(Activity.java:5207) 
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 
            at android.app.ActivityThread.access$600(ActivityThread.java:156) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 
            at android.os.Handler.dispatchMessage(Handler.java:99) 
            at android.os.Looper.loop(Looper.java:137) 
            at android.app.ActivityThread.main(ActivityThread.java:5303) 
            at java.lang.reflect.Method.invokeNative(Native Method) 
            at java.lang.reflect.Method.invoke(Method.java:525) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
            at dalvik.system.NativeStart.main(Native Method) 

Teşekkürler çocuklar

DÜZENLEME:

baskılı yığını şudur Ormlite: AesSedai101 belirtildiği gibi Yani, ben kullanıyorum ProGuard ve bir şey arasında bir mesele idi. Bu yüzden etiketi ve bana çalışan bir proguard dosyasını ekleyeceğiz:

-keepattributes Signature 
-keep class com.korcholis.clothio.data.** {  *; } 
-keep class com.j256.** 
-keepclassmembers class com.j256.** { *; } 
-keep enum com.j256.** 
-keepclassmembers enum com.j256.** { *; } 
-keep interface com.j256.** 
-keepclassmembers interface com.j256.** { *; } 

Eğer veritabanı modelleri saklamak paketi ile com.korcholis.clothio.data.** değiştirin, ancak son .**

+0

"SampleListFragment" kodunuzu gönderin. –

+0

uygulamanızı imzalamadan önce tüm lint error.you kullanarak bunu kullanarak bulabilirsiniz-Sağ Proje -> Android Araçlar -> Tıklayın lint.Ckeck ortak hatalar için hata –

+0

@SimplePlan Bu oldukça uzun, burada bir gist: https: // gist .github.com/Korcholis/10444650 – Korcholis

cevap

14

ProGuard benziyor unutma bir kurucuyu sınıflarınızın birinden kaldırıyor. Proguard yapılandırmasını manual'da belirtildiği gibi eklediğinizden emin olun. Bu eklenmezse, Proguard, Etkinlik yapıcıları gibi şeyleri içeren kullanılmayan tüm kodları kaldıracaktır.

+0

Kesinlikle! Teşekkürler, cevabınızı geçerli – Korcholis

+1

THANK YOU olarak kabul etmeme izin verin. Ve PS ... tekerleğin dönüşüne başlangıç ​​veya bitiş yoktur. Ama benim için - bu bir son oldu. <3 #WoT – Joel

0

Sadece bu soruna rastladım ve yeni bir imzalanmış APK oluşturmadan önce Build> Clean Project'i çalıştırdım.