0

I have a PhoneGap App and I am trying to add DroidGap:

import org.apache.cordova.DroidGap;
public class RestartAppActivity extends DroidGap {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

I also added cordova-2.9.1.jar to the libs folder. But now when I run the app MainActivity will not start. The error is L java.lang.NoSuchFieldError: No field launchUrl of type Ljava/lang/String MainActivity:

public class MainActivity extends CordovaActivity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        loadUrl(launchUrl);
    }
}

Thanks!

nmnir
  • 568
  • 1
  • 10
  • 24
  • 2.9.1 is _really_ old! Is there a reason you need to use such an old version? – Kerri Shotts Apr 20 '17 at 16:05
  • Thanks Kerri! DroidGap removed in the latest. It's the first time I'm using Phonegap, trying to add a patch to an app. Any alternatives for DroidGap? – nmnir Apr 20 '17 at 17:43
  • start by reading the getting started https://cordova.apache.org/#getstarted and then the docs https://cordova.apache.org/docs/en/latest/. – jcesarmobile Apr 21 '17 at 12:46

0 Answers0