Note that there are some explanatory texts on larger screens.

plurals
  1. POCordova 3, Unable to start activity
    primarykey
    data
    text
    <p>I am trying to start my Cordova 3 application, but it seems I am running into some problems.</p> <p><strong>Error log:</strong></p> <pre><code>09-28 18:03:05.538: E/AndroidRuntime(25370): FATAL EXCEPTION: main 09-28 18:03:05.538: E/AndroidRuntime(25370): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fourgamers.reader/com.fourgamers.reader.FourGamers}: java.lang.NullPointerException 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread.access$600(ActivityThread.java:140) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.os.Handler.dispatchMessage(Handler.java:99) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.os.Looper.loop(Looper.java:137) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread.main(ActivityThread.java:4898) 09-28 18:03:05.538: E/AndroidRuntime(25370): at java.lang.reflect.Method.invokeNative(Native Method) 09-28 18:03:05.538: E/AndroidRuntime(25370): at java.lang.reflect.Method.invoke(Method.java:511) 09-28 18:03:05.538: E/AndroidRuntime(25370): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006) 09-28 18:03:05.538: E/AndroidRuntime(25370): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 09-28 18:03:05.538: E/AndroidRuntime(25370): at dalvik.system.NativeStart.main(Native Method) 09-28 18:03:05.538: E/AndroidRuntime(25370): Caused by: java.lang.NullPointerException 09-28 18:03:05.538: E/AndroidRuntime(25370): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:374) 09-28 18:03:05.538: E/AndroidRuntime(25370): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:338) 09-28 18:03:05.538: E/AndroidRuntime(25370): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:451) 09-28 18:03:05.538: E/AndroidRuntime(25370): at com.fourgamers.reader.FourGamers.onCreate(FourGamers.java:31) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.Activity.performCreate(Activity.java:5206) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083) 09-28 18:03:05.538: E/AndroidRuntime(25370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064) 09-28 18:03:05.538: E/AndroidRuntime(25370): ... 11 more </code></pre> <p><strong>FourGamers.java</strong></p> <pre><code>/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.fourgamers.reader; import android.os.Bundle; import org.apache.cordova.*; public class FourGamers extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl(Config.getStartUrl(), 10000); super.onCreate(savedInstanceState); // Set by &lt;content src="index.html" /&gt; in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") } } </code></pre> <p><strong>AndroidManifest.xml</strong></p> <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt; &lt;manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="com.fourgamers.reader" xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name"&gt; &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/app_name" android:name="FourGamers" android:theme="@android:style/Theme.Black.NoTitleBar"&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; &lt;uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18" /&gt; &lt;/manifest&gt; </code></pre> <p>Any help would be greatly appreciated.</p> <p>Thank you.</p>
    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