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
plss help whit this error systemui FC when hit ltooglte for mobile data on/off on lidroid power wiget full log is in attachment
HTML:
build.board: MSM8960
build.bootloader: s1
build.brand: Sony
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: C5303
build.display: [email protected]_V_4.0_By_DuLe
build.fingerprint: Sony/C5303_1272-4891/C5303:4.1.2/12.0.A.2.254/Aff_nw:user/release-keys
build.hardware: qcom
build.host: BuildHost
build.id: 12.0.A.2.254
build.manufacturer: Sony
build.model: C5303
build.product: C5303_1272-4891
build.radio: unknown
build.serial: CB51243RV0
build.tags: release-keys
build.time: 1376471455000
build.type: user
build.user: BuildUser
version.codename: REL
version.incremental: Aff_nw
version.release: 4.1.2
version.sdk_int: 16
10-10 22:10:02.172 I/sysmon-tsens_tz_sensor0(382): sensor_work - read value = 450
10-10 22:10:02.412 W/dalvikvm(23054): threadid=1: thread exiting with uncaught exception (group=0x420f4650)
10-10 22:10:02.412 D/ConnectivityService(705): getMobileDataEnabled returning true
10-10 22:10:02.432 E/AndroidRuntime(23054): FATAL EXCEPTION: main
10-10 22:10:02.432 E/AndroidRuntime(23054): java.lang.SecurityException: ConnectivityService: Neither user 10168 nor current process has android.permission.CHANGE_NETWORK_STATE.
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.os.Parcel.readException(Parcel.java:1436)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.os.Parcel.readException(Parcel.java:1389)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.net.IConnectivityManager$Stub$Proxy.setMobileDataEnabled(IConnectivityManager.java:1091)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.net.ConnectivityManager.setMobileDataEnabled(ConnectivityManager.java:624)
10-10 22:10:02.432 E/AndroidRuntime(23054): at com.lidroid.systemui.quickpanel.MobileDataButton.toggleState(MobileDataButton.java)
10-10 22:10:02.432 E/AndroidRuntime(23054): at com.lidroid.systemui.quickpanel.PowerButton$2.onClick(PowerButton.java:181)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.view.View.performClick(View.java:4171)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.view.View$PerformClick.run(View.java:17186)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.os.Handler.handleCallback(Handler.java:615)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.os.Handler.dispatchMessage(Handler.java:92)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.os.Looper.loop(Looper.java:213)
10-10 22:10:02.432 E/AndroidRuntime(23054): at android.app.ActivityThread.main(ActivityThread.java:4793)
10-10 22:10:02.432 E/AndroidRuntime(23054): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 22:10:02.432 E/AndroidRuntime(23054): at java.lang.reflect.Method.invoke(Method.java:511)
10-10 22:10:02.432 E/AndroidRuntime(23054): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
10-10 22:10:02.432 E/AndroidRuntime(23054): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
10-10 22:10:02.432 E/AndroidRuntime(23054): at dalvik.system.NativeStart.main(Native Method)
10-10 22:10:02.522 D/ALSAStreamOps(389): setParameters(): keyRouting with device 0x2
10-10 22:10:02.522 D/ALSADevice(389): route: devices 0x2 in mode 0
10-10 22:10:02.522 D/alsa_ucm(389): snd_use_case_set(): uc_mgr 0x401c6fb8 identifier _enadev value xLoud Speaker
10-10 22:10:02.522 D/alsa_ucm(389): Set mixer controls for HiFi enable 1
10-10 22:10:02.522 D/alsa_ucm(389): Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1, value: 1
10-10 22:10:02.522 D/alsa_ucm(389): Set mixer controls for Play Lowlatency Music enable 1
Any one whant to help?
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
Hey there,
I tried the PdfRenderer Sample Project on serveral AVDs (API lvl 23 and 24) and on my Galaxy A5 2015 with CM13 (API 23). the app starts and shows an empty activity - after about 10 seconds it crashes.
The Error:
Code:
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.pdfrendererbasic, PID: 27604
Theme: themes:{default=overlay:system, iconPack:system, fontPkg:system, com.android.systemui=overlay:system, com.android.systemui.navbar=overlay:system}
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.pdfrendererbasic/com.example.android.pdfrendererbasic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer.getPageCount()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer.getPageCount()' on a null object reference
at com.example.android.pdfrendererbasic.PdfRendererBasicFragment.showPage(PdfRendererBasicFragment.java:163)
at com.example.android.pdfrendererbasic.PdfRendererBasicFragment.onViewCreated(PdfRendererBasicFragment.java:101)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:988)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
at android.app.BackStackRecord.run(BackStackRecord.java:793)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
at android.app.FragmentController.execPendingActions(FragmentController.java:325)
at android.app.Activity.performStart(Activity.java:6267)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)*
at android.app.ActivityThread.-wrap11(ActivityThread.java)*
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)*
at android.os.Handler.dispatchMessage(Handler.java:102)*
at android.os.Looper.loop(Looper.java:148)*
at android.app.ActivityThread.main(ActivityThread.java:5461)*
at java.lang.reflect.Method.invoke(Native Method)*
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)*
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)*
Application terminated.
What did I do wrong?
LG Christopher
Hello,
When I use Facebook, there IS thé following error :
Code:
FATAL EXCEPTION: ContactsProviderWorker
Process: android.process.acore, PID: 6295
java.lang.RuntimeException: Package manager has died
at android.app.ApplicationPackageManager.queryContentProviders(ApplicationPackageManager.java:696)
at com.android.providers.contacts.ContactDirectoryManager.getDirectoryProviderPackages(ContactDirectoryManager.java:219)
at com.android.providers.contacts.ContactDirectoryManager.scanAllPackages(ContactDirectoryManager.java:256)
at com.android.providers.contacts.ContactDirectoryManager.scanAllPackagesIfNeeded(ContactDirectoryManager.java:191)
at com.android.providers.contacts.ContactDirectoryManager.scanAllPackages(ContactDirectoryManager.java:181)
at com.android.providers.contacts.ContactsProvider2.updateDirectoriesInBackground(ContactsProvider2.java:1885)
at com.android.providers.contacts.ContactsProvider2.performBackgroundTask(ContactsProvider2.java:1704)
at com.android.providers.contacts.ContactsProvider2$1.handleMessage(ContactsProvider2.java:1523)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: android.os.TransactionTooLargeException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:496)
at android.content.pm.IPackageManager$Stub$Proxy.queryContentProviders(IPackageManager.java:2842)
at android.app.ApplicationPackageManager.queryContentProviders(ApplicationPackageManager.java:694)
... 10 more
What is the origin of problem and how correct?
I use WIKO PULP 4G with ANDROID 5.1.1
Thanks.