Hi i am making a muiti-utility math app the main screen has a calculator and a button that says tools when you click tools it takes you to the tools activity there I have a button that says factor calculator and it's (SUPPOSED TO) go to the Factor activity witch is (SUPPOSED TO) load Factor.html from assets/www/Factor.html using phonegap 2.9.0 Phonegap is set up right i have checked!! but when you click the factor calculator button i get a error message saying app name has stopped Please help me!!
here's a copy of my log cat:
06-28 12:53:41.005: D/AndroidRuntime(21461): Shutting down VM
06-28 12:53:41.015: W/dalvikvm(21461): threadid=1: thread exiting with uncaught exception (group=0x40a73930)
06-28 12:53:41.025: E/AndroidRuntime(21461): FATAL EXCEPTION: main
06-28 12:53:41.025: E/AndroidRuntime(21461): java.lang.NoClassDefFoundError: com.h2a.mtz.Factorpg
06-28 12:53:41.025: E/AndroidRuntime(21461): at com.h2a.mtz.Tools$1.onClick(Tools.java:35)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.view.View.performClick(View.java:4204)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.view.View$PerformClick.run(View.java:17355)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.os.Handler.handleCallback(Handler.java:725)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.os.Handler.dispatchMessage(Handler.java:92)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.os.Looper.loop(Looper.java:137)
06-28 12:53:41.025: E/AndroidRuntime(21461): at android.app.ActivityThread.main(ActivityThread.java:5041)
06-28 12:53:41.025: E/AndroidRuntime(21461): at java.lang.reflect.Method.invokeNative(Native Method)
06-28 12:53:41.025: E/AndroidRuntime(21461): at java.lang.reflect.Method.invoke(Method.java:511)
06-28 12:53:41.025: E/AndroidRuntime(21461): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-28 12:53:41.025: E/AndroidRuntime(21461): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-28 12:53:41.025: E/AndroidRuntime(21461): at dalvik.system.NativeStart.main(Native Method)
06-28 12:55:16.568: I/Process(21461): Sending signal. PID: 21461 SIG: 9
06-28 12:55:16.728: E/Trace(21654): error opening trace file: No such file or directory (2)
06-28 13:04:53.271: D/dalvikvm(22238): GC_CONCURRENT freed 58K, 1% free 9003K/9092K, paused 4ms+5ms, total 34ms
06-28 13:04:53.271: D/dalvikvm(22238): WAIT_FOR_CONCURRENT_GC blocked 28ms
06-28 13:04:53.281: W/dalvikvm(22238): Unable to resolve superclass of Lcom/h2a/mtz/Factorpg; (47)
06-28 13:04:53.281: W/dalvikvm(22238): Link of class 'Lcom/h2a/mtz/Factorpg;' failed
06-28 13:04:53.281: E/dalvikvm(22238): Could not find class 'com.h2a.mtz.Factorpg', referenced from method com.h2a.mtz.Tools$1.onClick
06-28 13:04:53.281: W/dalvikvm(22238): VFY: unable to resolve const-class 19 (Lcom/h2a/mtz/Factorpg in Lcom/h2a/mtz/Tools$1;
06-28 13:04:53.281: D/dalvikvm(22238): VFY: replacing opcode 0x1c at 0x0004
06-28 13:04:53.301: D/dalvikvm(22238): GC_CONCURRENT freed 111K, 2% free 9295K/9484K, paused 3ms+2ms, total 24ms
06-28 13:04:54.392: D/AndroidRuntime(22238): Shutting down VM
06-28 13:04:54.402: W/dalvikvm(22238): threadid=1: thread exiting with uncaught exception (group=0x40a73930)
06-28 13:04:54.402: E/AndroidRuntime(22238): FATAL EXCEPTION: main
06-28 13:04:54.402: E/AndroidRuntime(22238): java.lang.NoClassDefFoundError: com.h2a.mtz.Factorpg
06-28 13:04:54.402: E/AndroidRuntime(22238): at com.h2a.mtz.Tools$1.onClick(Tools.java:24)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.view.View.performClick(View.java:4204)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.view.View$PerformClick.run(View.java:17355)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.os.Handler.handleCallback(Handler.java:725)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.os.Handler.dispatchMessage(Handler.java:92)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.os.Looper.loop(Looper.java:137)
06-28 13:04:54.402: E/AndroidRuntime(22238): at android.app.ActivityThread.main(ActivityThread.java:5041)
06-28 13:04:54.402: E/AndroidRuntime(22238): at java.lang.reflect.Method.invokeNative(Native Method)
06-28 13:04:54.402: E/AndroidRuntime(22238): at java.lang.reflect.Method.invoke(Method.java:511)
06-28 13:04:54.402: E/AndroidRuntime(22238): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-28 13:04:54.402: E/AndroidRuntime(22238): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-28 13:04:54.402: E/AndroidRuntime(22238): at dalvik.system.NativeStart.main(Native Method)
06-28 13:04:57.565: I/Process(22238): Sending signal. PID: 22238 SIG: 9
06-28 13:04:57.665: E/Trace(22430): error opening trace file: No such file or directory (2)
heres a copy of tools.java:
package com.h2a.mtz;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.widget.Button;
public class Tools extends Activity {
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.tools);
Button factor=(Button)findViewById(R.id.factorpg);
factor.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myintent2 = new Intent(Tools.this,Factorpg.class);
startActivity(myintent2);
}
});
}
}
Factorpg.java:
package com.h2a.mtz;
import android.os.Bundle;
import android.view.Menu;
import org.apache.cordova.*;
public class Factorpg extends DroidGap {
@override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/Factor.html");
}
@override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.factorpg, menu);
return true;
}
}
any help is greatly appreciated
Thanks way in advance
rapsong11
Related
any hint on how to restore it?
I can enter safe mode, (pressing MENU key at boot) but I can't figure out what to fix.
Here is the logcat of homescreen crashing
Code:
W/ActivityManager( 1159): Activity pause timeout for HistoryRecord{2ff36928 com.sonyericsson.homescreen/.HomeScreen}
I/WindowManager( 1159): onOrientationChanged, rotation changed to 0
W/KeyCharacterMap( 1159): Can't open keycharmap file
W/KeyCharacterMap( 1159): Error loading keycharmap file '/system/usr/keychars/robyn_keypad.kcm.bin'. hw.keyboards.0.devname='robyn_keypad'
W/KeyCharacterMap( 1159): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
D/KeyguardViewMediator( 1159): pokeWakelock(5000)
I/ActivityManager( 1159): Process com.sonyericsson.homescreen (pid 1768) has died.
I/ActivityManager( 1159): Start proc com.sonyericsson.homescreen for activity com.sonyericsson.homescreen/.HomeScreen: pid=1780 uid=10009 gids={1015, 3003}
W/UsageStats( 1159): Something wrong here, didn't expect com.sonyericsson.homescreen to be resumed
I/ActivityThread( 1780): Publishing provider com.sonyericsson.homescreen.widgetprovider: com.sonyericsson.homescreen.widgetprovider.WidgetProvider
I/ActivityThread( 1780): Publishing provider com.sonyericsson.homescreen.settingsprovider: com.sonyericsson.homescreen.settingsprovider.SettingsProvider
I/ActivityManager( 1159): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.sonyericsson.homescreen/.HomeScreen }
I/ActivityManager( 1159): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.sonyericsson.homescreen/.HomeScreen }
W/dalvikvm( 1780): threadid=3: thread exiting with uncaught exception (group=0x2aac9a28)
E/AndroidRuntime( 1780): Uncaught handler: thread main exiting due to uncaught exception
I/global ( 1780): Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
E/AndroidRuntime( 1780): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sonyericsson.homescreen/com.sonyericsson.homescreen.HomeScreen}: java.lang.ClassCastException: android.graphics.drawable.NinePatchDrawable
E/AndroidRuntime( 1780): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
E/AndroidRuntime( 1780): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime( 1780): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime( 1780): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime( 1780): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1780): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1780): at android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime( 1780): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1780): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1780): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
E/AndroidRuntime( 1780): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
E/AndroidRuntime( 1780): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1780): Caused by: java.lang.ClassCastException: android.graphics.drawable.NinePatchDrawable
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.applicationloader.ItemFactory.internalCreateApplication(ItemFactory.java:90)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.applicationloader.ItemFactory.createApplication(ItemFactory.java:49)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.applicationloader.ApplicationLoader.loadApplicationInfoList(ApplicationLoader.java:84)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.launcher.model.LauncherModel.loadApplications(LauncherModel.java:846)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.launcher.model.LauncherModel.<init>(LauncherModel.java:223)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.launcher.model.LauncherModel.getInstance(LauncherModel.java:327)
E/AndroidRuntime( 1780): at com.sonyericsson.homescreen.HomeScreen.onCreate(HomeScreen.java:243)
E/AndroidRuntime( 1780): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime( 1780): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
E/AndroidRuntime( 1780): ... 11 more
I/CrashSMS( 1412): FileObserver found new crash data. Send DO_CRASH_MSG_ACTION
I/CrashSMS( 1412): Received DO_CRASH_MSG_ACTION
I/global ( 1412): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
I/CrashSMS( 1412): Picking oldest crash data file 1281433209.txt
I/CrashSMS( 1412): Compiling the crash report
I/global ( 1412): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
W/TimeStamp( 1412): TimeStamp is different! Directory: /system/app
I/CrashSMS( 1412): Storing report: type=2 unit=1
I/CrashSMS( 1412): MiscTA index = 2:1 1:1 10:1 9:1 8:1 7:1 6:1 5:1 4:1 3:1
I/MTBFParamSet( 1412): Converting to MTBF Message
I/CrashSMS( 1412): update counters and delete crash data
I/DumpStateReceiver( 1159): Added state dump to 1 crashes
I found the problem, it was the latest update of AnySoftKeyboard.
I already told the developer about the issue.
Do anyone experience the same problem?
It's easy to restore the phone, just reboot it in safe mode (keep MENU pressed at boot) and uninstall AnySoftKeyboard.
Ditto
The same thing happened to my wife's X10 mini after updating AnySoftKeyboard, just like you.
Thanks for providing the solution.
Uninstalled.
Nasty bug.
Same happend to me, thanks for sollution.
But I really like the soft-keyboard, hope he/she will fix the bug
good news, latest version in the market fixes the issue!
sorry for bad english
Found a strange problem! Pairing tablet via bluetooth with any phone, then choosing pair settings on tablet and in this mometn Settings menu is closing and we see working table with error "error in Settings program". Same thing with choosing mobile network settings. I've got a log of this problem (listed below), anybody can help with this bug?
Code:
D/BluetoothAdapterStateMachine( 1841): BluetoothOn process message: 1
W/BluetoothAdapterStateMachine( 1841): BluetoothOn received: 1
D/BluetoothEnabler( 4541): HW DETECTABILITY DEFAULT is 0
D/LocalBluetoothManager( 4541): setting foreground activity to non-null context
D/BluetoothInputDevice( 4541): getConnectedDevices()
D/BluetoothInputDevice( 4541): getPriority(D8:2A:7E:D1:D1:A2)
D/AndroidRuntime( 4541): Shutting down VM
W/dalvikvm( 4541): threadid=1: thread exiting with uncaught exception (group=0x40a7e1f8)
E/AndroidRuntime( 4541): FATAL EXCEPTION: main
E/AndroidRuntime( 4541): java.lang.NullPointerException
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.HeadsetProfile.isPreferred(HeadsetProfile.java:144)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.CachedBluetoothDevice.connectWithoutResettingTimer(CachedBluetoothDevice.java:238)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.CachedBluetoothDevice.connect(CachedBluetoothDevice.java:209)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.BluetoothDevicePreference.onClicked(BluetoothDevicePreference.java:201)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.DeviceListPreferenceFragment.onDevicePreferenceClick(DeviceListPreferenceFragment.java:192)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.BluetoothSettings.onDevicePreferenceClick(BluetoothSettings.java:369)
E/AndroidRuntime( 4541): at com.android.settings.bluetooth.DeviceListPreferenceFragment.onPreferenceTreeClick(DeviceListPreferenceFragment.java:184)
E/AndroidRuntime( 4541): at android.preference.Preference.performClick(Preference.java:949)
E/AndroidRuntime( 4541): at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:202)
E/AndroidRuntime( 4541): at android.widget.AdapterView.performItemClick(AdapterView.java:292)
E/AndroidRuntime( 4541): at android.widget.AbsListView.performItemClick(AbsListView.java:1068)
E/AndroidRuntime( 4541): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2524)
E/AndroidRuntime( 4541): at android.widget.AbsListView$1.run(AbsListView.java:3193)
E/AndroidRuntime( 4541): at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 4541): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 4541): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4541): at android.app.ActivityThread.main(ActivityThread.java:4521)
E/AndroidRuntime( 4541): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4541): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4541): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:762)
E/AndroidRuntime( 4541): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:529)
E/AndroidRuntime( 4541): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1841): Force finishing activity com.android.settings/.Settings
D/OppNotification( 2613): Stopping notification thread: NotificationUpdateThread-1356435222415
W/ActivityManager( 1841): Activity pause timeout for ActivityRecord{41595320 com.android.settings/.Settings}
E/dalvikvm( 4801): GC_CONCURRENT freed 1373K, 13% free 11484K/13191K, paused 2ms+15ms
I/Process ( 4541): Sending signal. PID: 4541 SIG: 9
D/Settings( 2052): getAllInstallLangId().length43
D/Settings( 2052): getAllInstallLangId().length43
I/WindowManager( 1841): WIN DEATH: Window{417b2068 com.android.settings/com.android.settings.Settings paused=false}
I/ActivityManager( 1841): Process com.android.settings (pid 4541) has died.
W/ActivityManager( 1841): Activity destroy timeout for ActivityRecord{41595320 com.android.settings/.Settings}
I'm in the process of learning to build android from source. I've got my AOKP rom booting and am working on adding superuser to it, and am running into troubles. After much googling here is what I've done
Cloned Superuser source code
Code:
git clone git://github.com/ChainsDD/Superuser.git packages/apps/Superuser
Copied the su binary from my current rom (/system/xbin/su) to my device tree
Edited device.mk
Code:
# Build superuser
PRODUCT_PACKAGES := \
Superuser
# copy su binary
PRODUCT_COPY_FILES += \
device/lge/E973/su:system/xbin/su
Everything built fine and Superuser is in my app drawer when rom boots. If i try to open Superuser it force closes. Root checker shows that i am rooted, and typing 'su' in terminal emulator gets root access. Neither will give me a dialog asking to deny or grant.
If i install SuperSuperuser from the market, it will present all the normal dialogs and everything seems as it should.
I'm wondering what it is I'm doing wrong, and how I can correct it.
Here is a logcat of the failed attempt to open superuser
Code:
D/dalvikvm( 2157): Late-enabling CheckJNI
I/ActivityManager( 530): Start proc com.noshufou.android.su for activity com.noshufou.android.su/.Su: pid=2157 uid=10040 gids={50040, 3003, 1015, 1028}
I/dalvikvm( 2157): Turning on JNI app bug workarounds for target SDK version 11...
D/overlay ( 161): FROM_STATE = OV_BYPASS_3_LAYER TO_STATE = OV_CLOSED
I/ActivityThread( 2157): Pub com.noshufou.android.su.provider: com.noshufou.android.su.provider.PermissionsProvider
D/Su.HomeActivity( 2157): onCreate()
D/AndroidRuntime( 2157): Shutting down VM
W/dalvikvm( 2157): threadid=1: thread exiting with uncaught exception (group=0x40dd7930)
E/AndroidRuntime( 2157): FATAL EXCEPTION: main
E/AndroidRuntime( 2157): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.noshufou.android.su/com.noshufou.android.su.HomeActivity}: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306)
E/AndroidRuntime( 2157): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2356)
E/AndroidRuntime( 2157): at android.app.ActivityThread.access$600(ActivityThread.java:150)
E/AndroidRuntime( 2157): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
E/AndroidRuntime( 2157): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2157): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2157): at android.app.ActivityThread.main(ActivityThread.java:5193)
E/AndroidRuntime( 2157): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2157): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2157): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 2157): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
E/AndroidRuntime( 2157): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2157): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:232)
E/AndroidRuntime( 2157): at com.actionbarsherlock.app.SherlockFragmentActivity.getSherlock(SherlockFragmentActivity.java:32)
E/AndroidRuntime( 2157): at com.actionbarsherlock.app.SherlockFragmentActivity.requestWindowFeature(SherlockFragmentActivity.java:265)
E/AndroidRuntime( 2157): at com.noshufou.android.su.HomeActivity.onCreate(HomeActivity.java:59)
E/AndroidRuntime( 2157): at android.app.Activity.performCreate(Activity.java:5104)
E/AndroidRuntime( 2157): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime( 2157): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2260)
E/AndroidRuntime( 2157): ... 11 more
E/AndroidRuntime( 2157): Caused by: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
E/AndroidRuntime( 2157): at java.lang.Class.getConstructorOrMethod(Class.java:460)
E/AndroidRuntime( 2157): at java.lang.Class.getConstructor(Class.java:431)
E/AndroidRuntime( 2157): at com.actionbarsherlock.ActionBarSherlock.wrap(ActionBarSherlock.java:229)
E/AndroidRuntime( 2157): ... 17 more
W/ActivityManager( 530): Force finishing activity com.noshufou.android.su/.Su
D/dalvikvm( 2157): GC_CONCURRENT freed 219K, 15% free 2489K/2912K, paused 2ms+1ms, total 21ms
I/dalvikvm( 530): Jit: resizing JitTable from 8192 to 16384
W/ActivityManager( 530): Activity pause timeout for ActivityRecord{41681370 u0 com.noshufou.android.su/.Su}
I/Process ( 2157): Sending signal. PID: 2157 SIG: 9
I/ActivityManager( 530): Process com.noshufou.android.su (pid 2157) has died.
W/InputMethodManagerService( 530): Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
D/dalvikvm( 530): GC_CONCURRENT freed 7964K, 44% free 13574K/23868K, paused 2ms+6ms, total 57ms
D/overlay ( 161): FROM_STATE = OV_CLOSED TO_STATE = OV_BYPASS_3_LAYER
just a lilttle bump, if anyone can just point me in the dirrection of where i'm going wrong here I would be very appreciative.
Hello everyone,
I have some problems with porting PAC to HTC Sensation:
1. getVolumeState(/mnt/usbdisk): Unknown volume - beacuse of that I have f/c on settings/storage and can't mount SD card. Workaround - pull and push sd card than can it read it. Here is full logcat:
Code:
W/MountService( 436): getVolumeState(/mnt/usbdisk): Unknown volume
D/AndroidRuntime(13478): Shutting down VM
W/dalvikvm(13478): threadid=1: thread exiting with uncaught exception (group=0x40af5930)
E/AndroidRuntime(13478): FATAL EXCEPTION: main
E/AndroidRuntime(13478): java.lang.IllegalArgumentException
E/AndroidRuntime(13478): at android.os.Parcel.readException(Parcel.java:1429)
E/AndroidRuntime(13478): at android.os.Parcel.readException(Parcel.java:1379)
E/AndroidRuntime(13478): at android.os.storage.IMountService$Stub$Proxy.getVolumeState(IMountService.java:241)
E/AndroidRuntime(13478): at android.os.storage.StorageManager.getVolumeState(StorageManager.java:555)
E/AndroidRuntime(13478): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory.updatePreferencesFromState(StorageVolumePreferenceCategory.java:241)
E/AndroidRuntime(13478): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory.updateApproximate(StorageVolumePreferenceCategory.java:335)
E/AndroidRuntime(13478): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory$1.handleMessage(StorageVolumePreferenceCategory.java:91)
E/AndroidRuntime(13478): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(13478): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(13478): at android.app.ActivityThread.main(ActivityThread.java:5237)
E/AndroidRuntime(13478): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(13478): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(13478): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
E/AndroidRuntime(13478): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime(13478): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 436): Force finishing activity com.android.settings/.Settings
W/ActivityManager( 436): Activity pause timeout for ActivityRecord{40f15f58 u0 com.android.settings/.Settings}
W/ThrottleService( 436): unable to find stats for iface rmnet0
2. Menu settings doesn't work. After touching softkey or the key on the screen it doesn't show program settings. I don't know how to fix it...
Thanks for any help!
You can PM or answer this thread.
Regards,
Hellmanor.
bump.
bump again.
More logcat:
Code:
I/DefContainer-JNI( 1584): error opening: /storage/sdcard0: Permission denied
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0) returned 0
W/StorageMeasurement( 1919): Problem in container service
W/StorageMeasurement( 1919): java.lang.IllegalStateException: libcore.io.ErrnoException: statfs failed: ENOENT (No such file or directory)
W/StorageMeasurement( 1919): at android.os.Parcel.readException(Parcel.java:1433)
W/StorageMeasurement( 1919): at android.os.Parcel.readException(Parcel.java:1379)
W/StorageMeasurement( 1919): at com.android.internal.app.IMediaContainerService$Stub$Proxy.getFileSystemStats(IMediaContainerService.java:464)
W/StorageMeasurement( 1919): at com.android.settings.deviceinfo.StorageMeasurement$MeasurementHandler.measureApproximateStorage(StorageMeasurement.java:384)
W/StorageMeasurement( 1919): at com.android.settings.deviceinfo.StorageMeasurement$MeasurementHandler.handleMessage(StorageMeasurement.java:350)
W/StorageMeasurement( 1919): at android.os.Handler.dispatchMessage(Handler.java:99)
W/StorageMeasurement( 1919): at android.os.Looper.loop(Looper.java:137)
W/StorageMeasurement( 1919): at android.os.HandlerThread.run(HandlerThread.java:60)
I/DefContainer-JNI( 1584): error opening: /storage/sdcard0: Permission denied
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Android) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Podcasts) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/DCIM) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Ringtones) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Movies) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Alarms) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Music) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Notifications) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Pictures) returned 0
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0/Download) returned 0
I/DefContainer-JNI( 1584): error opening: /storage/sdcard0: Permission denied
D/StorageMeasurement( 1919): getDirectorySize(/storage/sdcard0) returned 0
D/AndroidRuntime( 1919): Shutting down VM
W/dalvikvm( 1919): threadid=1: thread exiting with uncaught exception (group=0x40b09930)
W/MountService( 434): getVolumeState(/mnt/usbdisk): Unknown volume
E/AndroidRuntime( 1919): FATAL EXCEPTION: main
E/AndroidRuntime( 1919): java.lang.IllegalArgumentException
E/AndroidRuntime( 1919): at android.os.Parcel.readException(Parcel.java:1429)
E/AndroidRuntime( 1919): at android.os.Parcel.readException(Parcel.java:1379)
E/AndroidRuntime( 1919): at android.os.storage.IMountService$Stub$Proxy.getVolumeState(IMountService.java:241)
E/AndroidRuntime( 1919): at android.os.storage.StorageManager.getVolumeState(StorageManager.java:555)
E/AndroidRuntime( 1919): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory.updatePreferencesFromState(StorageVolumePreferenceCategory.java:241)
E/AndroidRuntime( 1919): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory.updateApproximate(StorageVolumePreferenceCategory.java:335)
E/AndroidRuntime( 1919): at com.android.settings.deviceinfo.StorageVolumePreferenceCategory$1.handleMessage(StorageVolumePreferenceCategory.java:91)
E/AndroidRuntime( 1919): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1919): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1919): at android.app.ActivityThread.main(ActivityThread.java:5237)
E/AndroidRuntime( 1919): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1919): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1919): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
E/AndroidRuntime( 1919): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime( 1919): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 434): Force finishing activity com.android.settings/.Settings
Hello guys
I am trying to build an application with 2 activities one is the main activity and the second activity which contain ImageView, and a 3 button’s. I want when I press the button to set as wallpaper the current image displayed in the ImageView . The problem is when I set the code for the Set Wallpaper button the first main activity is accessed without problems, but when I try to access the second activity the app crashes as you can see in the log. If I don’t configure the Set Wallpaper button, the code for the next and previous buttons runs smoothly. I tried several options and methods to configure the onClick for the Set Wallpaper button. Please help me with this problem. Here is my code:
Code:
public class Castles extends Activity {
protected static InputStream is;
public int currentImage = 0;
int[] imageIds = {
R.drawable.cas1,R.drawable.cas2,R.drawable.cas3,R.drawable.cas4,R.drawable.cas5,R.drawable.cas6,
R.drawable.cas7, R.drawable.cas8, R.drawable.cas9,R.drawable.cas10,R.drawable.cas11,R.drawable.cas12,
R.drawable.cas13,R.drawable.cas14,R.drawable.cas15,R.drawable.cas16, R.drawable.cas17,R.drawable.cas18,
R.drawable.cas19,R.drawable.cas20,R.drawable.cas21};
private Button BNatNext;
private Button BNatPri;
private Button BSetWallNat;
private ImageView IVNat;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.castles);
IVNat = (ImageView)findViewById(R.id.IVNat);
BNatNext=(Button)findViewById(R.id.BNatNext);
BNatPri=(Button)findViewById(R.id.BNatPri);
BNatNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
currentImage++;
currentImage=currentImage%imageIds.length;
IVNat.setImageResource(imageIds[currentImage]);
}
});
BNatPri.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
currentImage--;
currentImage=(currentImage+imageIds.length)%imageIds.length;
IVNat.setImageResource(imageIds[currentImage]);
}
});
BSetWallNat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
try {
} catch(IOException e){
Log.e("Tag", "couldn't set wallpaper", e);
}
}
And this is the LogCat:
Code:
12-04 21:44:15.205: D/dalvikvm(1223): GC_EXTERNAL_ALLOC freed 44K, 51% free 2670K/5379K, external 1527K/1559K, paused 418ms
12-04 21:44:18.282: D/dalvikvm(1223): GC_EXTERNAL_ALLOC freed 1K, 51% free 2669K/5379K, external 4560K/5695K, paused 486ms
12-04 21:44:24.043: D/gralloc_goldfish(1223): Emulator without GPU emulation detected.
12-04 21:44:27.853: D/dalvikvm(1223): GC_EXTERNAL_ALLOC freed 11K, 50% free 2698K/5379K, external 7974K/7974K, paused 201ms
12-04 21:44:32.223: D/dalvikvm(1223): GC_EXTERNAL_ALLOC freed 2K, 50% free 2702K/5379K, external 11198K/11388K, paused 321ms
12-04 21:44:34.903: D/AndroidRuntime(1223): Shutting down VM
12-04 21:44:34.903: W/dalvikvm(1223): threadid=1: thread exiting with uncaught exception (group=0xb609d4f0)
12-04 21:44:34.963: E/AndroidRuntime(1223): FATAL EXCEPTION: main
12-04 21:44:34.963: E/AndroidRuntime(1223): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Roapps.wallpaperhd/com.Roapps.wallpaperhd.Castles}: java.lang.NullPointerException
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.os.Looper.loop(Looper.java:130)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-04 21:44:34.963: E/AndroidRuntime(1223): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 21:44:34.963: E/AndroidRuntime(1223): at java.lang.reflect.Method.invoke(Method.java:507)
12-04 21:44:34.963: E/AndroidRuntime(1223): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-04 21:44:34.963: E/AndroidRuntime(1223): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-04 21:44:34.963: E/AndroidRuntime(1223): at dalvik.system.NativeStart.main(Native Method)
12-04 21:44:34.963: E/AndroidRuntime(1223): Caused by: java.lang.NullPointerException
12-04 21:44:34.963: E/AndroidRuntime(1223): at com.Roapps.wallpaperhd.Castles.onCreate(Castles.java:63)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-04 21:44:34.963: E/AndroidRuntime(1223): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-04 21:44:34.963: E/AndroidRuntime(1223): ... 11 more
12-04 21:44:38.963: I/Process(1223): Sending signal. PID: 1223 SIG: 9