Quantcast
Viewing all articles
Browse latest Browse all 78

Android Java: Intent Problem

I've been asking a lot of questions in StackOverflow and so far no one's been able to help me.

Code:

        public void doSomething(View v) {
                Intent i = new Intent(this, com.viva.demo.MainActivity.class);
                startActivity(i);
        }

The above code is the code for my button. What it suppose to do is to redirect it to the JAR file that I included in the Java Project that I have. There's no error in the code. It's just that after clicking the button, the application crashes.

Below is my logcat:

Code:

        08-19 19:17:30.940: D/dalvikvm(26519): VFY: replacing opcode 0x1c at 0x0002
        08-19 19:17:30.950: D/dalvikvm(2614): GC_EXPLICIT freed <1K, 27% free 6422K/8771K, paused 0ms+0ms
        08-19 19:17:30.950: D/dalvikvm(2614): GC_EXPLICIT freed <1K, 27% free 6422K/8771K, paused 0ms+0ms
        08-19 19:17:30.960: W/InputManagerService(2624): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@b32849d0 (uid=1000 pid=26271)
        08-19 19:17:30.970: I/PGA(26519): New SOCKET connection: .wodota.test123 (pid 26519, tid 26519)
        08-19 19:17:30.980: I/ActivityManager(2624): Displayed com.wodota.test123/.MainActivity: +80ms
        08-19 19:17:33.660: E/InputDispatcher(2624): Motion event has invalid pointer count 0; value must be between 1 and 16.
        08-19 19:17:33.730: E/InputDispatcher(2624): Motion event has invalid pointer count 0; value must be between 1 and 16.
        08-19 19:17:33.730: D/AndroidRuntime(26519): Shutting down VM
        08-19 19:17:33.730: W/dalvikvm(26519): threadid=1: thread exiting with uncaught exception (group=0xb2c63180)
        08-19 19:17:33.730: D/BstCommandProcessor-Application(2806): Application crash has been observed.
        08-19 19:17:33.730: I/Process(26519): Sending signal. PID: 26519 SIG: 9
        08-19 19:17:33.730: D/AndroidRuntime(26519): procName from cmdline: com.wodota.test123
        08-19 19:17:33.730: E/AndroidRuntime(26519): in writeCrashedAppName, pkgName :com.wodota.test123
        08-19 19:17:33.730: D/AndroidRuntime(26519): file written successfully with content: com.wodota.test123 StringBuffer : ;com.wodota.test123
        08-19 19:17:33.730: E/AndroidRuntime(26519): FATAL EXCEPTION: main
        08-19 19:17:33.730: E/AndroidRuntime(26519): java.lang.IllegalStateException: Could not execute method of the activity
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.view.View$1.onClick(View.java:3044)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.view.View.performClick(View.java:3511)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.view.View$PerformClick.run(View.java:14105)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.os.Handler.handleCallback(Handler.java:605)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.os.Handler.dispatchMessage(Handler.java:92)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.os.Looper.loop(Looper.java:137)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.app.ActivityThread.main(ActivityThread.java:4424)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at java.lang.reflect.Method.invokeNative(Native Method)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at java.lang.reflect.Method.invoke(Method.java:511)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at dalvik.system.NativeStart.main(Native Method)
        08-19 19:17:33.730: E/AndroidRuntime(26519): Caused by: java.lang.reflect.InvocationTargetException
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at java.lang.reflect.Method.invokeNative(Native Method)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at java.lang.reflect.Method.invoke(Method.java:511)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at android.view.View$1.onClick(View.java:3039)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        ... 11 more
        08-19 19:17:33.730: E/AndroidRuntime(26519): Caused by: java.lang.NoClassDefFoundError: com.viva.demo.MainActivity
        08-19 19:17:33.730: E/AndroidRuntime(26519):        at com.wodota.test123.MainActivity.doSomething(MainActivity.java:26)
        08-19 19:17:33.730: E/AndroidRuntime(26519):        ... 14 more
        08-19 19:17:33.740: I/WindowManager(2624): WIN DEATH: Window{b341f500 com.wodota.test123/com.wodota.test123.MainActivity paused=false}
        08-19 19:17:33.740: I/ActivityManager(2624): Process com.wodota.test123 (pid 26519) has died.
        08-19 19:17:33.740: W/ActivityManager(2624): Force removing ActivityRecord{b30ace88 com.wodota.test123/.MainActivity}: app died, no saved state
        08-19 19:17:33.740: D/ActivityManager(2624): TopActivityInfo, pkgName: com.android.settings activityName: com.android.settings/.Settings  bstSpecialAppKeyboardHandlingEnabled = false
        08-19 19:17:33.740: D/ActivityManager(2624): Showing guidance for pkgName: com.android.settings
        08-19 19:17:33.750: V/AudioHardware(515): open playback normal
        08-19 19:17:33.750: V/AudioHardware(515): write() wakeup setting route SPK
        08-19 19:17:33.750: D/GuidanceScreen(2777): hiding guidance
        08-19 19:17:33.750: D/GuidanceScreen(2777): event === app_launch
        08-19 19:17:33.750: D/GuidanceScreen(2777): hardKeyboard = 1
        08-19 19:17:33.750: D/GuidanceScreen(2777): controllerType === DualAction
        08-19 19:17:33.750: D/GuidanceScreen(2777): appName: Settings, currentPkg: com.android.settings, event: app_launch, controller: DualAction
        08-19 19:17:33.750: D/GuidanceScreen(2777): appName: Settings
        08-19 19:17:33.750: D/GuidanceScreen(2777): no guidance for com.android.settings.
        08-19 19:17:33.770: I/ManageApplications(26271): onCreateOptionsMenu in ManageApplications{b3502558 #1 id=0x10202d4}: com.android.internal.view.menu.MenuBuilder@b3549888
        08-19 19:17:33.780: D/VoldCmdListener(507): asec fspath air.com.playtika.slotomania-2
        08-19 19:17:33.780: W/InputManagerService(2624): Got RemoteException sending setActive(false) notification to pid 26519 uid 10055
        08-19 19:17:33.790: D/VoldCmdListener(507): asec fspath com.igg.bzbee.slotsdeluxe-2
        08-19 19:17:33.790: D/VoldCmdListener(507): asec fspath com.kingsky.moto3dAndroid-1
        08-19 19:17:36.770: D/AudioHardware(515): AudioHardware pcm playback is going to standby.
        08-19 19:17:42.290: W/ActivityManager(2624): Activity destroy timeout for ActivityRecord{b319b598 com.android.packageinstaller/.UninstallAppProgress}
        08-19 19:17:43.860: I/ActivityManager(2624): No longer want com.google.android.partnersetup (pid 26421): hidden #9
        08-19 19:17:45.640: D/Finsky(26435): [1] 5.onFinished: Installation state replication succeeded.
        08-19 19:18:20.210: D/dalvikvm(3343): GC_CONCURRENT freed 1914K, 40% free 6446K/10691K, paused 0ms+0ms

Below is the tutorial example that I followed and modified it a little. Instead of a new MainActivity, I changed it to a JAR file. The JAR file has a MainActivity inside.

https://www.youtube.com/watch?v=qurvm-E9AiU

Viewing all articles
Browse latest Browse all 78

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>