Note that there are some explanatory texts on larger screens.

plurals
  1. POUnfortunately HelloWorld has stopped ( Android )
    primarykey
    data
    text
    <p>I'm following this tutorial: <a href="http://mobile.tutsplus.com/tutorials/phonegap/phonegap-from-scratch/" rel="nofollow">http://mobile.tutsplus.com/tutorials/phonegap/phonegap-from-scratch/</a> ( on windows )</p> <p>and I get the message from the tittle. I don't know if this changes anything ( don't think so ) but my files from phonegap are called cordova.js and cordova.jar. I only changed in the index.html route for cordova.js. Also - I don't know if my phone-device in phonegap is correctly configured ( but on the other hand - i don't know how could I screw it ). The emulator is starting but when I click on my app it shows.. THE message.</p> <p><strong>manifest.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hello.world" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7" /&gt; &lt;supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true" android:anyDensity="true" /&gt; &lt;uses-permission android:name="android.permission.CAMERA" /&gt; &lt;uses-permission android:name="android.permission.VIBRATE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /&gt; &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.RECEIVE_SMS" /&gt; &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt; &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt; &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt; &lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name="hello.world.FullscreenActivity" android:configChanges="orientation|keyboardHidden|screenSize" android:label="@string/app_name" android:theme="@style/FullscreenTheme" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; </code></pre> <p></p> <p><strong>FullscreenActivity.java</strong> ( with some of the comments removed )</p> <pre><code>package hello.world; import hello.world.util.SystemUiHider; import org.apache.cordova.DroidGap; import android.annotation.TargetApi; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.view.MotionEvent; import android.view.View; public class FullscreenActivity extends DroidGap { private static final boolean AUTO_HIDE = true; private static final int AUTO_HIDE_DELAY_MILLIS = 3000; private static final boolean TOGGLE_ON_CLICK = true; private static final int HIDER_FLAGS = SystemUiHider.FLAG_HIDE_NAVIGATION; private SystemUiHider mSystemUiHider; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); final View controlsView = findViewById(R.id.fullscreen_content_controls); final View contentView = findViewById(R.id.fullscreen_content); mSystemUiHider = SystemUiHider.getInstance(this, contentView, HIDER_FLAGS); mSystemUiHider.setup(); mSystemUiHider .setOnVisibilityChangeListener(new SystemUiHider.OnVisibilityChangeListener() { // Cached values. int mControlsHeight; int mShortAnimTime; @Override @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) public void onVisibilityChange(boolean visible) { if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB_MR2) { if (mControlsHeight == 0) { mControlsHeight = controlsView.getHeight(); } if (mShortAnimTime == 0) { mShortAnimTime = getResources().getInteger( android.R.integer.config_shortAnimTime); } controlsView.animate() .translationY(visible ? 0 : mControlsHeight) .setDuration(mShortAnimTime); } else { controlsView.setVisibility(visible ? View.VISIBLE : View.GONE); } if (visible &amp;&amp; AUTO_HIDE) { // Schedule a hide(). delayedHide(AUTO_HIDE_DELAY_MILLIS); } } }); contentView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (TOGGLE_ON_CLICK) { mSystemUiHider.toggle(); } else { mSystemUiHider.show(); } } }); findViewById(R.id.dummy_button).setOnTouchListener(mDelayHideTouchListener); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); delayedHide(100); } View.OnTouchListener mDelayHideTouchListener = new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { if (AUTO_HIDE) { delayedHide(AUTO_HIDE_DELAY_MILLIS); } return false; } }; Handler mHideHandler = new Handler(); Runnable mHideRunnable = new Runnable() { @Override public void run() { mSystemUiHider.hide(); } }; private void delayedHide(int delayMillis) { mHideHandler.removeCallbacks(mHideRunnable); mHideHandler.postDelayed(mHideRunnable, delayMillis); } } </code></pre> <p><strong>EDIT:</strong></p> <p><strong>LogCat</strong></p> <p>1</p> <pre><code>2-06 07:51:43.490: I/CordovaLog(799): Changing log level to DEBUG(3) 12-06 07:51:43.500: I/CordovaLog(799): Found preference for useBrowserHistory=true 12-06 07:51:43.500: D/CordovaLog(799): Found preference for useBrowserHistory=true 12-06 07:51:43.500: I/CordovaLog(799): Found preference for exit-on-suspend=false 12-06 07:51:43.500: D/CordovaLog(799): Found preference for exit-on-suspend=false 12-06 07:51:43.500: D/DroidGap(799): DroidGap.onCreate() 12-06 07:51:43.860: V/WebViewChromium(799): Binding Chromium to the main looper Looper{b1d30dd0} 12-06 07:51:43.880: I/chromium(799): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0 12-06 07:51:43.930: I/BrowserProcessMain(799): Initializing chromium process, renderers=0 12-06 07:51:44.320: E/chromium(799): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found. 12-06 07:51:44.320: E/chromium(799): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed. 12-06 07:51:44.320: E/chromium(799): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found. 12-06 07:51:44.340: E/chromium(799): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed. 12-06 07:51:44.340: E/chromium(799): [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed 12-06 07:51:44.420: W/chromium(799): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation 12-06 07:51:44.820: D/dalvikvm(799): GC_FOR_ALLOC freed 68K, 5% free 3033K/3168K, paused 330ms, total 333ms 12-06 07:51:44.840: I/dalvikvm-heap(799): Grow heap (frag case) to 4.095MB for 1127536-byte allocation 12-06 07:51:45.020: D/dalvikvm(799): GC_FOR_ALLOC freed 1K, 4% free 4133K/4272K, paused 175ms, total 175ms 12-06 07:51:45.490: D/CordovaWebView(799): CordovaWebView is running on device made by: unknown 12-06 07:51:45.530: D/JsMessageQueue(799): Set native-&gt;JS mode to 2 12-06 07:51:45.570: D/DroidGap(799): DroidGap.init() 12-06 07:51:45.610: D/CordovaWebView(799): &gt;&gt;&gt; loadUrl(file:///android_asset/www/index.html) 12-06 07:51:45.610: D/PluginManager(799): init() 12-06 07:51:45.630: D/CordovaWebView(799): &gt;&gt;&gt; loadUrlNow() 12-06 07:51:45.980: D/AndroidRuntime(799): Shutting down VM 12-06 07:51:45.980: W/dalvikvm(799): threadid=1: thread exiting with uncaught exception (group=0xb1a5cb90) 12-06 07:51:46.090: E/AndroidRuntime(799): FATAL EXCEPTION: main 12-06 07:51:46.090: E/AndroidRuntime(799): Process: hello.world, PID: 799 12-06 07:51:46.090: E/AndroidRuntime(799): java.lang.RuntimeException: Unable to start activity ComponentInfo{hello.world/hello.world.FullscreenActivity}: java.lang.NullPointerException 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread.access$700(ActivityThread.java:135) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.os.Handler.dispatchMessage(Handler.java:102) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.os.Looper.loop(Looper.java:137) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread.main(ActivityThread.java:4998) 12-06 07:51:46.090: E/AndroidRuntime(799): at java.lang.reflect.Method.invokeNative(Native Method) 12-06 07:51:46.090: E/AndroidRuntime(799): at java.lang.reflect.Method.invoke(Method.java:515) 12-06 07:51:46.090: E/AndroidRuntime(799): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) 12-06 07:51:46.090: E/AndroidRuntime(799): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) 12-06 07:51:46.090: E/AndroidRuntime(799): at dalvik.system.NativeStart.main(Native Method) 12-06 07:51:46.090: E/AndroidRuntime(799): Caused by: java.lang.NullPointerException 12-06 07:51:46.090: E/AndroidRuntime(799): at hello.world.util.SystemUiHiderHoneycomb.setup(SystemUiHiderHoneycomb.java:74) 12-06 07:51:46.090: E/AndroidRuntime(799): at hello.world.FullscreenActivity.onCreate(FullscreenActivity.java:61) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.Activity.performCreate(Activity.java:5243) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 12-06 07:51:46.090: E/AndroidRuntime(799): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140) 12-06 07:51:46.090: E/AndroidRuntime(799): ... 11 more 12-06 07:52:30.250: I/Process(799): Sending signal. PID: 799 SIG: 9 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload