导出我的应用并加载到Google Play后,我在应用启动时崩溃了。但是,当我从Eclipse加载它时,一切都很好。我不知道问题可能是什么:
Log Cat:
> java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mytaxicontrol/com.mytaxicontrol.MyTaxiControlActivity}: java.lang.ClassNotFoundException: Didn't find class "com.mytaxicontrol.MyTaxiControlActivity" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.mytaxicontrol-3.apk"],nativeLibraryDirectories=[/data/app-lib/com.mytaxicontrol-3, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2208)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2340)
at android.app.ActivityThread.access$800(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1247)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
这是清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mytaxicontrol"
android:versionCode="1083"
android:versionName="3.0.6">
<uses-permission android:name="com.mytaxicontrol.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<permission
android:name="com.mytaxicontrol.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-sdk android:minSdkVersion="14" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application android:label="@string/app_name" android:icon="@drawable/icon"
android:allowBackup="true">
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIz...................."/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="android.app.default_searchable"
android:value=".search" />
<service android:name="BillingService" />
<activity android:name=".MyTaxiControlActivity" android:launchMode="singleTop"
android:label="myTaxi Control"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
<activity android:name=".Instructions" android:launchMode="singleTop"
android:screenOrientation="portrait"
android:label="@string/app_name">
</activity>
<activity android:name=".Tariffs" android:launchMode="singleTop"
android:screenOrientation="portrait"
android:label="@string/app_name">
</activity>
<activity android:name=".Taxis" android:launchMode="singleTop"
android:screenOrientation="portrait"
android:label="@string/app_name">
</activity>
<activity android:name=".Preferences" android:launchMode="singleTop"
android:screenOrientation="portrait"
android:label="@string/app_name">
</activity>
<activity android:name=".InApp"
android:screenOrientation="portrait"
android:label="@string/app_name">
</activity>
</application>
</manifest>
答案 0 :(得分:0)
构建路径中缺少json jar。为什么Eclipse没有发送有意义的错误消息?我们作为开发人员的生活可以变得如此简单。