我在使用“android:name="ManageApps"”的第二个 Activity 上收到此错误,
'net.web44.jimappdev.thecoincollector.ManageApps' is not assignable to 'android.app.Activity' Validates resource references inside Android XML files.
这是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
最佳答案
看起来您的 ManageApps Activity 不在包 namespace 中:
<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>
名称必须以 . 开头才能被视为包 namespace 的一部分:
android:name=".ManageApps"
此外,尽管我不是 100% 确定,但我始终假设操作名称区分大小写。在上面的 list 部分中,您使用 manageapps 作为操作名称的最后一部分,而在 Java 代码中构建 Intent 时以混合大小写的方式使用它:
startActivity(new Intent("net.web44.jimappdev.thecoincollector.ManageApps"));
关于java - "Validates resource references inside Android XML files",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27664926/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub
我正在尝试使用boilerpipe来自JRuby。我看过guide从JRuby调用Java,并成功地将它与另一个Java包一起使用,但无法弄清楚为什么同样的东西不能用于boilerpipe。我正在尝试基本上从JRuby中执行与此Java等效的操作:URLurl=newURL("http://www.example.com/some-location/index.html");Stringtext=ArticleExtractor.INSTANCE.getText(url);在JRuby中试过这个:require'java'url=java.net.URL.new("http://www
我在新的Debian6VirtualBoxVM上安装RVM时遇到问题。我已经安装了所有需要的包并使用下载了安装脚本(curl-shttps://rvm.beginrescueend.com/install/rvm)>rvm,但以单个用户身份运行时bashrvm我收到以下错误消息:ERROR:Unabletocheckoutbranch.安装在这里停止,并且(据我所知)没有安装RVM的任何文件。如果我以root身份运行脚本(对于多用户安装),我会收到另一条消息:Successfullycheckedoutbranch''安装程序继续并指示成功,但未添加.rvm目录,甚至在修改我的.bas