5

Tôi đã có một trang được tạo bởi một công ty khác để thực hiện một số cập nhật về nó nhưng tôi không thể làm được. Tôi đã đấu tranh với vấn đề này trong gần 10h ngay bây giờ và đã trải qua rất nhiều chủ đề cho thấy các giải pháp khác nhau cho lỗi này nhưng không có may mắn.java.lang.ClassNotFoundException trong bộ nạp dalvik.system.PathClassLoader khi khởi chạy ứng dụng

Tôi đã cố gắng để làm sạch và xây dựng lại và thay đổi tệp kê khai của mình theo những cách khác nhau nhưng không thành công. Nhưng tôi vẫn nghĩ rằng vấn đề có thể nằm trong tệp kê khai nhưng không chắc chắn.

12-11 09:47:47.687: E/AndroidRuntime(9756): FATAL EXCEPTION: main  
12-11 09:47:47.687: E/AndroidRuntime(9756): java.lang.RuntimeException: Unable to instantiate application com.visma.falck.android.assistance.FalckAssistanceApplication: java.lang.ClassNotFoundException: com.visma.falck.android.assistance.FalckAssistanceApplication in loader dalvik.system.PathClassLoader[/data/app/com.visma.falck.android.assistance-1.apk]  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.LoadedApk.makeApplication(LoadedApk.java:490)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3901)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.ActivityThread.access$2200(ActivityThread.java:135)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1098)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.os.Handler.dispatchMessage(Handler.java:99)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.os.Looper.loop(Looper.java:150)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.ActivityThread.main(ActivityThread.java:4385)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at java.lang.reflect.Method.invokeNative(Native Method)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at java.lang.reflect.Method.invoke(Method.java:507)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at dalvik.system.NativeStart.main(Native Method)  
12-11 09:47:47.687: E/AndroidRuntime(9756): Caused by: java.lang.ClassNotFoundException: com.visma.falck.android.assistance.FalckAssistanceApplication in loader dalvik.system.PathClassLoader[/data/app/com.visma.falck.android.assistance-1.apk]  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.Instrumentation.newApplication(Instrumentation.java:951)  
12-11 09:47:47.687: E/AndroidRuntime(9756):  at android.app.LoadedApk.makeApplication(LoadedApk.java:481) 

EDIT: Sau khi cập nhật manifest theo ρяσѕρєя KI nhận được một lỗi khác nhau trong cùng một phong cách:

12-11 10:23:08.917: E/AndroidRuntime(9949): FATAL EXCEPTION: main  
12-11 10:23:08.917: E/AndroidRuntime(9949): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.visma.falck.android.assistance/com.visma.falck.android.assistance.SplashScreen}: java.lang.ClassNotFoundException: com.visma.falck.android.assistance.SplashScreen in loader dalvik.system.PathClassLoader[/data/app/com.visma.falck.android.assistance-1.apk]  
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1785) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.os.Handler.dispatchMessage(Handler.java:99) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.os.Looper.loop(Looper.java:150) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread.main(ActivityThread.java:4385) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at java.lang.reflect.Method.invokeNative(Native Method) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at java.lang.reflect.Method.invoke(Method.java:507) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at dalvik.system.NativeStart.main(Native Method) 
12-11 10:23:08.917: E/AndroidRuntime(9949): Caused by: java.lang.ClassNotFoundException: com.visma.falck.android.assistance.SplashScreen in loader dalvik.system.PathClassLoader[/data/app/com.visma.falck.android.assistance-1.apk] 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.Instrumentation.newActivity(Instrumentation.java:1040) 
12-11 10:23:08.917: E/AndroidRuntime(9949):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1777) 

manifest mới:

<?xml version="1.0" encoding="utf-8"?> 
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="com.visma.falck.android.assistance" android:versionCode="5" android:versionName="1.4"> 

     <uses-sdk android:minSdkVersion="8" /> 

     <!-- To access connectivity information --> 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
     <!-- To access the phone number --> 
     <uses-permission android:name="android.permission.READ_PHONE_STATE" /> 

    <!-- To allow debugging on all models --> 
    <!-- <uses-permission android:name="android.permission.SET_DEBUG_APP"></uses-permission> --> 

     <!-- For all services, e.g. https, google maps --> 
     <uses-permission android:name="android.permission.INTERNET" /> 
     <!-- For google maps --> 
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
     <!-- For google maps --> 
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
     <uses-permission android:name="android.permission.LOCATION" /> 
     <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission> 

     <application 
      android:icon="@drawable/application_icon" 
      android:label="@string/app_name" 
      android:theme="@style/theme"> 

<activity android:name=".FalckAssistanceApplication" 
       android:label="@string/app_name"> 
       android:allowBackup="true" 
       android:debuggable="false" 
    </activity> 



      <activity android:name="com.visma.falck.android.assistance.SplashScreen" 
       android:configChanges="orientation" android:debuggable="true"> 
       <intent-filter> 
        <action android:name="android.intent.action.MAIN" /> 
        <category android:name="android.intent.category.LAUNCHER" /> 
       </intent-filter> 
      </activity> 

      <!-- wheel menu --> 
      <activity android:name="com.visma.falck.android.assistance.menu.MenuActivity" android:debuggable="true" 
         android:label="@string/app_name"> 
      </activity> 


      <activity android:name="Contact" android:debuggable="true"/> 


     <activity android:name="Info" android:debuggable="true"/> 
     <activity android:name=".information.TermsOfUse" android:debuggable="true"/> 
     <activity android:name=".information.Tip" android:debuggable="true"/> 
     <activity android:name=".information.TryAgain" android:debuggable="true"/> 
     <activity android:name="Registration" android:debuggable="true" android:windowSoftInputMode="stateUnchanged|adjustResize" android:configChanges="orientation"/> 


     <activity android:name=".userprofile.UserInformation" android:debuggable="true" android:windowSoftInputMode="stateUnchanged|adjustResize" android:configChanges="orientation"/> 
     <activity android:name=".userprofile.Abonement" android:debuggable="true" android:windowSoftInputMode="stateUnchanged|adjustResize" android:configChanges="orientation"/> 
     <activity android:name=".userprofile.AddVehicle" android:debuggable="true" android:windowSoftInputMode="stateUnchanged|adjustResize"/> 
     <activity android:name=".userprofile.AddSubscription" android:debuggable="true"/> 
     <activity android:name=".userprofile.EditVehicle" android:debuggable="true"/> 
     <activity android:name=".userprofile.EditVehicleLastRegistration" android:debuggable="true"/> 
     <activity android:name=".userprofile.EditVehicleMileage" android:debuggable="true"/> 
     <activity android:name=".userprofile.EditVehicleRegistration" android:debuggable="true"/> 
     <activity android:name=".userprofile.VehicleType" android:debuggable="true"/> 

     <activity android:name=".order.WaitForCallActivity" android:debuggable="true" android:configChanges="orientation"/> 
     <activity android:name=".order.AssistanceMap" android:debuggable="true" android:configChanges="orientation"/> 
     <activity android:name=".order.OngoingAssistanceMap" android:debuggable="true" android:configChanges="orientation"/> 
     <activity android:name=".order.Compass" android:debuggable="true" /> 
     <activity android:name=".order.CompassActivity" android:debuggable="true" android:screenOrientation="portrait" android:configChanges="orientation"/> 
     <activity android:name=".order.Order" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="com.visma.falck.android.assistance.return.customer"/> 
      </intent-filter> 
     </activity> 
     <activity android:name=".order.Problem" android:debuggable="true"/> 
     <activity android:name=".order.SubProblem" android:debuggable="true"/> 
     <activity android:name=".order.MyVehicle" android:debuggable="true"/> 
     <activity android:name=".order.Trailer" android:debuggable="true"/> 
     <activity android:name=".order.WaitForCall" android:debuggable="true"/> 
     <activity android:name=".order.FalckIsOnItsWay" android:debuggable="true"/> 
     <activity android:name=".order.PeopleInTheCar" android:debuggable="true"/> 
     <activity android:name=".order.PersonalInfo" android:debuggable="true" android:windowSoftInputMode="stateUnchanged|adjustResize"/> 
     <activity android:name=".order.EnterMobileNumber" android:debuggable="true"/> 
     <activity android:name=".order.SelectAddress" android:debuggable="true"/> 
     <receiver android:name=".order.WaitForCall$PhoneCallEndReceiver"> 
      <intent-filter> 
       <action android:name="com.visma.falck.android.assistance.waitforcall.endcall" /> 
      </intent-filter> 
     </receiver> 
     <service android:name=".order.PhoneCallHandlingService"> 
      <intent-filter> 
       <action android:name="com.visma.falck.android.assistance.waitforcall.endcall"/> 
      </intent-filter> 
     </service> 

     <!-- My Info: Subscriber --> 
     <activity android:name="MyInfoSubscriber" android:debuggable="true"/> 
     <!-- My Info: Welcome --> 
     <activity android:name="MyInfoWelcome" android:debuggable="true"/> 
     <!-- My Info: Registration --> 
     <activity android:name="MyInfoRegistration" android:debuggable="true"/> 

     <activity android:name="FrontPage" android:debuggable="true"/> 

     <activity android:name="com.visma.falck.android.assistance.Main" android:debuggable="true" 
      android:label="@string/app_name"> 
     </activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.station.StationList" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <action android:name="android.intent.action.PICK" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.dir/vnd.falck.assistance.station" /> 
      </intent-filter> 
     </activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.station.StationListActivity" android:label="Find falck-station" android:debuggable="true"> 

     </activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.station.StationDetail" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.item/vnd.falck.assistance.station" /> 
      </intent-filter> 
     </activity> 

     <activity android:name=".activity.station.StationMap" android:debuggable="true" android:configChanges="orientation"/> 

     <activity android:name="StationActivity" android:debuggable="true"></activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.garage.GarageList" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <action android:name="android.intent.action.PICK" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.dir/vnd.falck.assistance.garage" /> 
      </intent-filter> 
     </activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.garage.GarageListActivity" android:debuggable="true"/> 

     <activity android:name="com.visma.falck.android.assistance.activity.garage.GarageDetail" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.item/vnd.falck.assistance.garage" /> 
      </intent-filter> 
     </activity> 

     <activity android:name=".activity.garage.GarageMap" android:debuggable="true" android:configChanges="orientation"/> 

     <!-- Rental car: list --> 
     <activity android:name="com.visma.falck.android.assistance.activity.rentalcar.RentalCarList" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <action android:name="android.intent.action.PICK" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.dir/vnd.falck.assistance.rentalcar" /> 
      </intent-filter> 
     </activity> 

     <activity android:name="com.visma.falck.android.assistance.activity.rentalcar.RentalCarStationListActivity" android:debuggable="true"/> 

     <activity android:name="com.visma.falck.android.assistance.activity.rentalcar.RentalCarListActivity" android:debuggable="true"/> 


     <!-- Rental car: details --> 
     <activity android:name="com.visma.falck.android.assistance.activity.rentalcar.RentalCarDetail" android:debuggable="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="vnd.android.cursor.item/vnd.falck.assistance.rentalcar" /> 
      </intent-filter> 
     </activity> 

     <activity android:name=".activity.rentalcar.RentalCarMap" android:debuggable="true" android:configChanges="orientation"/> 

     <activity android:name=".activity.rentalcar.MyBenefitsCarRental" android:debuggable="true"/> 
     <activity android:name=".activity.garage.MyBenefitsGarage" android:debuggable="true"/> 


     <activity android:name=".Test" /> 


     <service android:name=".service.MainDataService" android:debuggable="true" 
      android:process="com.visma.falck.android.assistance.service.MainDataService"> 
      <intent-filter> 
       <action android:name="com.visma.falck.create.user" /> 
       <action android:name="com.visma.falck.update.user" /> 
       <action android:name="com.visma.falck.reset.user" /> 
       <action android:name="com.visma.falck.get.user.completion" /> 
       <action android:name="com.visma.falck.get.customer" /> 
       <action android:name="com.visma.falck.get.garage.list" /> 
       <action android:name="com.visma.falck.get.falck.station.list" /> 
       <action android:name="com.visma.falck.get.rental.car.station.list" /> 
       <action android:name="com.visma.falck.create.assistance" /> 
       <action android:name="com.visma.falck.get.ongoing.assistance" /> 
       <action android:name="com.visma.falck.get.text" /> 
      </intent-filter> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </service> 

     <!-- <uses-library android:name="com.google.android.maps" /> --> 

    </application> 

</manifest> 

Nếu bất cứ ai có thể giúp tôi với điều này nó sẽ được đánh giá rất nhiều! Cảm ơn

Trả lời

1

tuyên bố FalckAssistanceApplication như

<activity android:name=".FalckAssistanceApplication" 
       android:label="@string/app_name"> 
    </activity> 

thay vì thêm trong thẻ < Application

<application 
     android:icon="@drawable/application_icon" 
     android:label="@string/app_name" 
     android:theme="@style/theme" 
     android:name=".FalckAssistanceApplication" <<--remove 
           <<-- FalckAssistanceApplication from here 
     android:allowBackup="true" 
     android:debuggable="false"> 
    ///..... 
+0

@PaperThick: đăng nhật ký mới của bạn và cũng Manifest để được giúp đỡ nhiều hơn –

+0

câu hỏi cập nhật. Cảm ơn bạn đã giúp đỡ – PaperThick

+0

@PaperThick: trong đó gói bạn có hoạt động 'SplashScreen'? thử như '.SplashScreen' instad của 'com.visma.falck.android.assistance.SplashScreen' trong manifast.xml –

Các vấn đề liên quan