java - PackageManager not found using android and phonegap -
package com.example.jqmtest; import android.app.activity; import android.os.bundle; import org.apache.cordova.*; public class myactivity extends droidgap { /** * called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); super.loadurl("file:///home/dotcue/jqmtest/assets/www/index.html"); } }
i use code , getting following error.
error:(7, 8) java: cannot access android.content.pm.packagemanager class file android.content.pm.packagemanager not found
i new android , phonegap. kindly me. thank you
i write following.and working fine me.
i think error because of syntax of loadurl.change below hope work.
package com.demoapp; import org.apache.cordova.droidgap; import android.os.bundle; public class eosactivity extends droidgap { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); super.loadurl("file:///android_asset/www/index.html", 5000); } }
add following code in manifest.
<activity android:name="com.phonegap.droidgap" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity>
Comments
Post a Comment