"验证Android XML文件中的资源引用"

时间:2014-12-27 06:19:08

标签: java android xml

我在使用" android:name =" ManageApps" ",

的第二个Activity上收到此错误
  

' net.web44.jimappdev.thecoincollector.ManageApps'不能分配给' android.app.Activity'   验证Android XML文件中的资源引用。

这是Manifest.xml,

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.web44.jimappdev.thecoincollector" >

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="ManageApps"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="net.web44.jimappdev.thecoincollector.manageapps" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>


    <activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

    <meta-data android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version"/>
</application>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>

以下是MainActivity.java,

package net.web44.jimappdev.thecoincollector;

import android.content.Intent;
//import android.media.Image;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.AdRequest;

public class MainActivity extends ActionBarActivity implements View.OnClickListener {

// AdViews
private AdView adView;
private static final String AD_UNIT_ID = "ca-app-pub-7840388903463976/1730307243";
private static final String DEVICE_ID = "3FAECD3006B2EF61";

Button button1;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // AdViews
    adView = (AdView) this.findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(DEVICE_ID)
            .build();
    adView.loadAd(adRequest);

    // New Activity button
    button1 = (Button)findViewById(R.id.button1);
    button1.setOnClickListener(this);
}

    // new activity button
public void button1Click() {

    startActivity(new Intent("net.web44.jimappdev.thecoincollector.ManageApps"));

}
    // New Activity button
    public void onClick (View v) {
        switch (v.getId())
        {
            case R.id.button1:
                button1Click();
                break;
        }


        }

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}
}

这是我尝试运行后的logcat,

12-26 23:38:10.328    9114-9114/net.web44.jimappdev.thecoincollector D/dalvikvm﹕           GC_FOR_ALLOC freed 144K, 37% free 17054K/27036K, paused 19ms, total 19ms
12-26 23:38:10.428    9114-9114/net.web44.jimappdev.thecoincollector I/dalvikvm-heap﹕   Grow heap (frag case) to 70.860MB for 51609616-byte allocation
12-26 23:38:10.818    9114-9226/net.web44.jimappdev.thecoincollector D/dalvikvm﹕  DexOpt: --- BEGIN 'ads1427203900.jar' (bootstrap=0) ---
12-26 23:38:10.828    9114-9114/net.web44.jimappdev.thecoincollector   V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1)  {42ada888}
12-26 23:38:10.828    9114-9114/net.web44.jimappdev.thecoincollector I/LibraryLoader﹕  Expected native library version number "",actual native library version number ""
12-26 23:38:10.828    9114-9114/net.web44.jimappdev.thecoincollector I/chromium﹕ [   INFO:library_loader_hooks.cc(116)] Chromium logging enabled: level = 0, default verbosity =  0
12-26 23:38:10.828    9114-9114/net.web44.jimappdev.thecoincollector    I/BrowserStartupController﹕ Initializing chromium process, renderers=0
12-26 23:38:10.848    9114-9114/net.web44.jimappdev.thecoincollector   E/AudioManagerAndroid﹕ BLUETOOTH permission is missing!
12-26 23:38:10.858    9114-9114/net.web44.jimappdev.thecoincollector I/Adreno-EGL﹕   <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build:  (CL3869936)
OpenGL ES Shader Compiler Version: 17.01.11.SPL
Build Date: 01/17/14 Fri
    Local Branch:
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
12-26 23:38:10.918    9114-9114/net.web44.jimappdev.thecoincollector I/Ads﹕ Starting ad request.
12-26 23:38:10.918    9114-9114/net.web44.jimappdev.thecoincollector I/Ads﹕ Use AdRequest.Builder.addTestDevice("A3345A0900C390D5B080A31927017399") to get test ads on this device.
12-26 23:38:10.928    9114-9114/net.web44.jimappdev.thecoincollector I/Ads﹕ Please set theme of AdActivity to @android:style/Theme.Translucent to enable transparent background interstitial ad.
12-26 23:38:10.928    9114-9114/net.web44.jimappdev.thecoincollector D/Activity﹕ #1 setTransGradationModeColor false
12-26 23:38:10.948    9114-9226/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ DexOpt: --- END 'ads1427203900.jar' (success) ---
12-26 23:38:10.948    9114-9226/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ DEX prep '/data/data/net.web44.jimappdev.thecoincollector/cache/ads1427203900.jar': unzip in 0ms, rewrite 139ms
12-26 23:38:11.008    9114-9114/net.web44.jimappdev.thecoincollector D/OpenGLRenderer﹕ Enabling debug mode 0
12-26 23:38:13.321    9114-9122/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 11
12-26 23:38:13.321    9114-9122/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 12
12-26 23:38:13.321    9114-9122/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 13
12-26 23:38:13.321    9114-9122/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 14
12-26 23:38:14.302    9114-9249/net.web44.jimappdev.thecoincollector W/chromium﹕ [WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
12-26 23:38:16.494    9114-9114/net.web44.jimappdev.thecoincollector I/Ads﹕ Scheduling ad refresh 60000 milliseconds from now.
12-26 23:38:16.494    9114-9114/net.web44.jimappdev.thecoincollector I/Ads﹕ Ad finished loading.
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdutils﹕ FBIOGET_FSCREENINFO failed
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-26 23:38:16.554    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-26 23:38:17.815    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-26 23:38:17.815    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-26 23:38:17.815    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-26 23:38:17.815    9114-9114/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-26 23:38:21.979    9114-9114/net.web44.jimappdev.thecoincollector D/Instrumentation﹕ checkStartActivityResult  :Intent { act=ManageApps }
12-26 23:38:21.979    9114-9114/net.web44.jimappdev.thecoincollector D/Instrumentation﹕ checkStartActivityResult  inent is instance of inent:
12-26 23:38:21.979    9114-9114/net.web44.jimappdev.thecoincollector D/AndroidRuntime﹕ Shutting down VM
12-26 23:38:21.979    9114-9114/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41878da0)
12-26 23:38:21.989    9114-9114/net.web44.jimappdev.thecoincollector E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: net.web44.jimappdev.thecoincollector, PID: 9114
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=ManageApps }
            at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1660)
            at android.app.Instrumentation.execStartActivity(Instrumentation.java:1430)
            at android.app.Activity.startActivityForResult(Activity.java:3628)
            at android.app.Activity.startActivityForResult(Activity.java:3589)
            at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:817)
            at android.app.Activity.startActivity(Activity.java:3831)
            at android.app.Activity.startActivity(Activity.java:3799)
            at net.web44.jimappdev.thecoincollector.MainActivity.startButtonClick(MainActivity.java:46)
            at net.web44.jimappdev.thecoincollector.MainActivity.onClick(MainActivity.java:54)
            at android.view.View.performClick(View.java:4753)
            at android.view.View$PerformClick.run(View.java:19562)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5635)
            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:1291)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
            at dalvik.system.NativeStart.main(Native Method)
12-26 23:38:27.044    9114-9114/net.web44.jimappdev.thecoincollector I/Process﹕ Sending signal. PID: 9114 SIG: 9
12-26 23:47:08.893  11822-11822/net.web44.jimappdev.thecoincollector I/SELinux﹕ Function: selinux_android_load_priority , priority [2] , priority version is VE=SEPF_SGH-M919_4.4.4_0032
12-26 23:47:08.903  11822-11822/net.web44.jimappdev.thecoincollector E/dalvikvm﹕ >>>>> Normal User
12-26 23:47:08.903  11822-11822/net.web44.jimappdev.thecoincollector E/dalvikvm﹕ >>>>> net.web44.jimappdev.thecoincollector [ userId:0 | appId:10266 ]
12-26 23:47:08.903  11822-11822/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ Late-enabling CheckJNI
12-26 23:47:09.053  11822-11822/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ newInstance failed: p0 i0 [0 a1
12-26 23:47:09.053  11822-11822/net.web44.jimappdev.thecoincollector D/AndroidRuntime﹕ Shutting down VM
12-26 23:47:09.053  11822-11822/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41878da0)
12-26 23:47:09.073  11822-11822/net.web44.jimappdev.thecoincollector E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: net.web44.jimappdev.thecoincollector, PID: 11822
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{net.web44.jimappdev.thecoincollector/net.web44.jimappdev.thecoincollector.MainActivity}: java.lang.InstantiationException: can't instantiate class net.web44.jimappdev.thecoincollector.MainActivity
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
            at android.app.ActivityThread.access$900(ActivityThread.java:170)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5635)
            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:1291)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.InstantiationException: can't instantiate class net.web44.jimappdev.thecoincollector.MainActivity
            at java.lang.Class.newInstanceImpl(Native Method)
            at java.lang.Class.newInstance(Class.java:1208)
            at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2299)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2495)
            at android.app.ActivityThread.access$900(ActivityThread.java:170)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1304)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5635)
            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:1291)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
            at dalvik.system.NativeStart.main(Native Method)
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ VFY: unable to resolve virtual method 11747: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ VFY: unable to resolve virtual method 11753: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
12-27 00:11:16.265  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
12-27 00:11:16.275  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
12-27 00:11:16.275  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ VFY: unable to resolve virtual method 9398: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
12-27 00:11:16.275  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ VFY: unable to resolve virtual method 534: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ VFY: unable to resolve virtual method 556: Landroid/content/res/TypedArray;.getType (I)I
12-27 00:11:16.285  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
12-27 00:11:16.476  24403-24403/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ GC_FOR_ALLOC freed 144K, 37% free 17054K/27036K, paused 16ms, total 16ms
12-27 00:11:16.596  24403-24403/net.web44.jimappdev.thecoincollector I/dalvikvm-heap﹕ Grow heap (frag case) to 70.860MB for 51609616-byte allocation
12-27 00:11:16.966  24403-24487/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ DexOpt: --- BEGIN 'ads1427203900.jar' (bootstrap=0) ---
12-27 00:11:17.006  24403-24403/net.web44.jimappdev.thecoincollector V/WebViewChromiumFactoryProvider﹕ Binding Chromium to main looper Looper (main, tid 1) {42adac10}
12-27 00:11:17.016  24403-24403/net.web44.jimappdev.thecoincollector I/LibraryLoader﹕ Expected native library version number "",actual native library version number ""
12-27 00:11:17.016  24403-24403/net.web44.jimappdev.thecoincollector I/chromium﹕ [INFO:library_loader_hooks.cc(116)] Chromium logging enabled: level = 0, default verbosity = 0
12-27 00:11:17.016  24403-24403/net.web44.jimappdev.thecoincollector I/BrowserStartupController﹕ Initializing chromium process, renderers=0
12-27 00:11:17.036  24403-24403/net.web44.jimappdev.thecoincollector E/AudioManagerAndroid﹕ BLUETOOTH permission is missing!
12-27 00:11:17.056  24403-24403/net.web44.jimappdev.thecoincollector I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build:  (CL3869936)
    OpenGL ES Shader Compiler Version: 17.01.11.SPL
    Build Date: 01/17/14 Fri
    Local Branch:
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
12-27 00:11:17.096  24403-24487/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ DexOpt: --- END 'ads1427203900.jar' (success) ---
12-27 00:11:17.096  24403-24487/net.web44.jimappdev.thecoincollector D/dalvikvm﹕ DEX prep '/data/data/net.web44.jimappdev.thecoincollector/cache/ads1427203900.jar': unzip in 0ms, rewrite 131ms
12-27 00:11:17.146  24403-24403/net.web44.jimappdev.thecoincollector I/Ads﹕ Starting ad request.
12-27 00:11:17.146  24403-24403/net.web44.jimappdev.thecoincollector I/Ads﹕ Use AdRequest.Builder.addTestDevice("A3345A0900C390D5B080A31927017399") to get test ads on this device.
12-27 00:11:17.156  24403-24403/net.web44.jimappdev.thecoincollector I/Ads﹕ Please set theme of AdActivity to @android:style/Theme.Translucent to enable transparent background interstitial ad.
12-27 00:11:17.176  24403-24403/net.web44.jimappdev.thecoincollector D/Activity﹕ #1 setTransGradationModeColor false
12-27 00:11:17.256  24403-24403/net.web44.jimappdev.thecoincollector D/OpenGLRenderer﹕ Enabling debug mode 0
12-27 00:11:19.879  24403-24511/net.web44.jimappdev.thecoincollector W/chromium﹕ [WARNING:proxy_service.cc(890)] PAC support disabled because there is no system implementation
12-27 00:11:19.959  24403-24410/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 11
12-27 00:11:19.959  24403-24410/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 12
12-27 00:11:19.959  24403-24410/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 13
12-27 00:11:19.959  24403-24410/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 14
12-27 00:11:19.959  24403-24410/net.web44.jimappdev.thecoincollector I/dalvikvm﹕ Total arena pages for JIT: 15
12-27 00:11:20.209  24403-24738/net.web44.jimappdev.thecoincollector I/chromium﹕ [INFO:simple_index_file.cc(437)] Simple Cache Index is being restored from disk.
12-27 00:11:20.590  24403-24403/net.web44.jimappdev.thecoincollector I/Ads﹕ Scheduling ad refresh 60000 milliseconds from now.
12-27 00:11:20.590  24403-24403/net.web44.jimappdev.thecoincollector I/Ads﹕ Ad finished loading.
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdutils﹕ FBIOGET_FSCREENINFO failed
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-27 00:11:20.630  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-27 00:11:20.640  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-27 00:11:20.650  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=3000000 flags=1
12-27 00:11:20.650  24403-24403/net.web44.jimappdev.thecoincollector E/qdmemalloc﹕ heap_msk=40000000 flags=1
12-27 00:11:32.521  24403-24403/net.web44.jimappdev.thecoincollector D/Instrumentation﹕ checkStartActivityResult  :Intent { act=net.web44.jimappdev.thecoincollector.ManageApps }
12-27 00:11:32.521  24403-24403/net.web44.jimappdev.thecoincollector D/Instrumentation﹕ checkStartActivityResult  inent is instance of inent:
12-27 00:11:32.521  24403-24403/net.web44.jimappdev.thecoincollector D/AndroidRuntime﹕ Shutting down VM
12-27 00:11:32.521  24403-24403/net.web44.jimappdev.thecoincollector W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41878da0)
12-27 00:11:32.541  24403-24403/net.web44.jimappdev.thecoincollector E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: net.web44.jimappdev.thecoincollector, PID: 24403
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=net.web44.jimappdev.thecoincollector.ManageApps }
            at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1660)
            at android.app.Instrumentation.execStartActivity(Instrumentation.java:1430)
            at android.app.Activity.startActivityForResult(Activity.java:3628)
            at android.app.Activity.startActivityForResult(Activity.java:3589)
            at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:817)
            at android.app.Activity.startActivity(Activity.java:3831)
            at android.app.Activity.startActivity(Activity.java:3799)
            at net.web44.jimappdev.thecoincollector.MainActivity.button1Click(MainActivity.java:43)
            at net.web44.jimappdev.thecoincollector.MainActivity.onClick(MainActivity.java:51)
            at android.view.View.performClick(View.java:4753)
            at android.view.View$PerformClick.run(View.java:19562)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5635)
            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:1291)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
            at dalvik.system.NativeStart.main(Native Method)
12-27 00:11:34.663  24403-24403/net.web44.jimappdev.thecoincollector I/Process﹕ Sending signal. PID: 24403 SIG: 9

2 个答案:

答案 0 :(得分:5)

您的ManageApps活动似乎不在包名称空间中:

<activity
    android:name="ManageApps"
    android:label="@string/app_name">
    <intent-filter>
        <action android:name="net.web44.jimappdev.thecoincollector.manageapps" />

        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

名称必须以.开头才能被视为包名称空间的一部分:

    android:name=".ManageApps"

另外,即使我不是100%肯定,我也总是认为动作名称区分大小写。在上面的清单部分中,您使用manageapps作为操作名称的最后部分,而在Java代码中构建intent时以混合大小写形式使用它:

startActivity(new Intent("net.web44.jimappdev.thecoincollector.ManageApps"));

答案 1 :(得分:0)

将其添加到迷你拳头中

  android:name=".ManageApps"