Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
207 views
in Technique[技术] by (71.8m points)

logging - Android Studio - logcat

Can someone tell me what is wrong with my app it crashes on statr . Here is the LogCat:

Process: com.moneyegg.bdpsoft.makemonepaypal, PID: 3358
                                                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.moneyegg.bdpsoft.makemonepaypal/com.moneyegg.bdpsoft.makemonepaypal.MainActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class uses-permission
                                                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
                                                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
                                                                                       at android.app.ActivityThread.access$800(ActivityThread.java:151)
                                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
                                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                       at android.os.Looper.loop(Looper.java:135)
                                                                                       at android.app.ActivityThread.main(ActivityThread.java:5254)
                                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
                                                                                    Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class uses-permission
                                                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
                                                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
                                                                                       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
                                                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
                                                                                       at com.moneyegg.bdpsoft.makemonepaypal.MainActivity.onCreate(MainActivity.java:32)
                                                                                       at android.app.Activity.performCreate(Activity.java:5990)
                                                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
                                                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)?
                                                                                       at android.app.ActivityThread.access$800(ActivityThread.java:151)?
                                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)?
                                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)?
                                                                                       at android.os.Looper.loop(Looper.java:135)?
                                                                                       at android.app.ActivityThread.main(ActivityThread.java:5254)?
                                                                                       at java.lang.reflect.Method.invoke(Native Method)?
                                                                                       at java.lang.reflect.Method.invoke(Method.java:372)?
                                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)?
                                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)?
                                                                                    Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.uses-permission" on path: DexPathList[[zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/base.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.moneyegg.bdpsoft.makemonepaypal-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/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.view.LayoutInflater.createView(LayoutInflater.java:571)
                                                                                       at android.view.LayoutInflater.onCreateView(LayoutInflater.java:665)
                                                                                       at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:65)
                                                                                       at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
                                                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
                                                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)?
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:504)?
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:414)?
                                                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:365)?
                                                                                       at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)?
                                                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)?
                                                                                       at com.moneyegg.bdpsoft.makemonepaypal.MainActivity.onCreate(MainActivity.java:32)?
                                                                                       at android.app.Activity.performCreate(Activity.java:5990)?
                                                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)?
                                                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)?
                                                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)?
                                                                                       at android.app.ActivityThread.access$800(ActivityThread.java:151)?
                                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)?
                                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)?
                                                                                       at android.os.Looper.loop(Looper.java:135)?
                                                                                       at android.app.ActivityThread.main(ActivityThread.java:5254)?
                                                                                       at java.lang.reflect.Method.invoke(Native Method)?
                                                                                       at java.lang.reflect.Method.invoke(Method.java:372)?
                                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)?
                                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)?
                                                                                    Suppressed: java.lang.ClassNotFoundException: android.view.uses-permission
                                                                                       at java.lang.Class.classForName(Native Method)
                                                                                       at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                                       at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                       

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check your XML for Main Activity, there is a permission declaration, which should go to AndroidManifest.xml, and not in layout XMLs.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...