I just started to study Android.
I made an app for simple test using PhoneGap, but the deviceready event wasn't fired.
So, I read LogCat and found some errors.
02-24 21:10:18.110: D/dalvikvm(8584): GC_FOR_ALLOC freed 93K, 21% free 9617K/12168K, paused 20ms, total 20ms
02-24 21:10:18.110: I/dalvikvm-heap(8584): Grow heap (frag case) to 12.861MB for 1127536-byte allocation
02-24 21:10:18.130: D/dalvikvm(8584): GC_FOR_ALLOC freed <1K, 20% free 10718K/13272K, paused 18ms, total 18ms
02-24 21:10:18.145: I/webclipboard(8584): clipservice: android.sec.clipboard.ClipboardExManager#4322ffe0
02-24 21:10:18.200: I/CordovaLog(8584): Changing log level to DEBUG(3)
02-24 21:10:18.200: I/CordovaLog(8584): Found preference for useBrowserHistory=true
02-24 21:10:18.200: D/CordovaLog(8584): Found preference for useBrowserHistory=true
02-24 21:10:18.200: I/CordovaLog(8584): Found preference for exit-on-suspend=false
02-24 21:10:18.200: D/CordovaLog(8584): Found preference for exit-on-suspend=false
02-24 21:10:18.205: D/JsMessageQueue(8584): Set native->JS mode to 2
02-24 21:10:18.210: D/DroidGap(8584): DroidGap.init()
02-24 21:10:18.225: D/CordovaWebView(8584): >>> loadUrl(file:///android_asset/www/index.html)
02-24 21:10:18.225: D/PluginManager(8584): init()
02-24 21:10:18.230: D/CordovaWebView(8584): >>> loadUrlNow()
02-24 21:10:18.235: D/WebView(8584): loadUrlImpl: called
02-24 21:10:18.235: D/DroidGap(8584): Resuming the App
02-24 21:10:18.285: D/SoftKeyboardDetect(8584): Ignore this event
02-24 21:10:18.325: V/webkit(8584): BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {43227980}
02-24 21:10:18.335: D/webcore(8584): CORE loadUrl: called
02-24 21:10:18.335: D/webkit(8584): Firewall not null
02-24 21:10:18.345: D/webkit(8584): euler: isUrlBlocked = false
02-24 21:10:18.360: D/libEGL(8584): loaded /system/lib/egl/libEGL_mali.so
02-24 21:10:18.370: D/libEGL(8584): loaded /system/lib/egl/libGLESv1_CM_mali.so
02-24 21:10:18.450: D/libEGL(8584): loaded /system/lib/egl/libGLESv2_mali.so
02-24 21:10:18.455: E/(8584): Device driver API match
02-24 21:10:18.455: E/(8584): Device driver API version: 23
02-24 21:10:18.455: E/(8584): User space API version: 23
02-24 21:10:18.455: E/(8584): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Fri Nov 29 14:18:37 KST 2013
02-24 21:10:18.535: D/OpenGLRenderer(8584): Enabling debug mode 0
02-24 21:10:18.540: D/WebView(8584): onSizeChanged - w:720 h:1230
02-24 21:10:18.570: D/DroidGap(8584): onMessage(onPageStarted,file:///android_asset/www/index.html)
02-24 21:10:18.570: D/SoftKeyboardDetect(8584): Ignore this event
02-24 21:10:19.005: D/CordovaLog(8584): onload event
02-24 21:10:19.005: D/CordovaLog(8584): file:///android_asset/www/index.html: Line 50 : onload event
02-24 21:10:19.005: I/Web Console(8584): onload event:50
02-24 21:10:19.010: I/GATE(8584): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
02-24 21:10:19.010: D/Cordova(8584): onPageFinished(file:///android_asset/www/index.html)
02-24 21:10:19.010: D/WebView(8584): loadUrlImpl: called
02-24 21:10:19.010: D/webcore(8584): CORE loadUrl: called
02-24 21:10:19.010: D/webkit(8584): Firewall not null
02-24 21:10:19.010: D/webkit(8584): euler: isUrlBlocked = false
02-24 21:10:19.015: D/DroidGap(8584): onMessage(onNativeReady,null)
02-24 21:10:19.015: D/DroidGap(8584): onMessage(onPageFinished,file:///android_asset/www/index.html)
02-24 21:10:19.060: E/SQLiteLog(8584): (14) cannot open file at line 32516 of [00bb9c9ce4]
02-24 21:10:19.060: E/SQLiteLog(8584): (14) os_unix.c:32516: (2) open(/CachedGeoposition.db) -
02-24 21:10:19.060: D/WebKit(8584): ERROR:
02-24 21:10:19.060: D/WebKit(8584): SQLite database failed to load from /CachedGeoposition.db
02-24 21:10:19.060: D/WebKit(8584): Cause - unable to open database file
02-24 21:10:19.060: D/WebKit(8584): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
02-24 21:10:21.015: D/DroidGap(8584): onMessage(spinner,stop)
02-24 21:10:21.050: D/TilesManager(8584): Starting TG #0, 0x4225c580
02-24 21:10:21.050: D/TilesManager(8584): new EGLContext from framework: 421dcb88
02-24 21:10:21.050: D/GLWebViewState(8584): Reinit shader
02-24 21:10:21.050: D/GLWebViewState(8584): Reinit transferQueue
I think Device driver API Match error is problem..
And here's Manifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ex5"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.ex5.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
index.html File
<!DOCTYPE html>
<html>
<head>
<title>index</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="cordova-2.2.0.js"></script>
<script type="text/javascript">
function onDeviceReady() {
console.log("deviceready");
alert('test');
}
function init() {
console.log('onload event');
document.addEventListener("deviceready", onDeviceReady, false);
}
</script>
</head>
<body onload="init();">
</body>
</html>
And MainActivity.java File
package com.example.ex5;
import org.apache.cordova.DroidGap;
import android.os.Bundle;
import android.view.Menu;
public class MainActivity extends DroidGap {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
I tested on Galaxy S3 Android Version is 4.3.
But, test on Galaxy S2 Android Version 4.0.3 worked well.
I don't know what are the problems of my sources or my Galaxy S3 Device or Android Version.
Please let me know what are the things I should fix.
That error was fun! I reseted the usb keys today on my S3 and after got that error. When I tried to run my another app, the error was gone :D
Related
My google maps in android yields a black map. Is it because I have my files set up incorrectly (libraries in the wrong place etc.?)
Images:
The black screen:
The libraries and whatnot:
Are all my imported libraries correct?
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sonnet"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.example.barcodelibrary.permission.MAPS_RECEIVE"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.sonnet.FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:theme="#style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.sonnet.Map"
android:label="#string/title_activity_map" >
</activity>
<activity
android:name="com.example.sonnet.MapActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_map"
android:theme="#style/FullscreenTheme" >
</activity>
<uses-library android:name="com.google.android.maps"/>
<meta-data
android:name="com.google.android.maps.v2.stuff"
android:value="stuff" />
</application>
</manifest>
there 'stuff' means my API key.
And my Logcat:
02-06 16:14:44.735: D/AndroidRuntime(5651): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-06 16:14:44.735: D/AndroidRuntime(5651): CheckJNI is OFF
02-06 16:14:44.745: D/dalvikvm(5651): Trying to load lib libjavacore.so 0x0
02-06 16:14:44.745: D/dalvikvm(5651): Added shared lib libjavacore.so 0x0
02-06 16:14:44.755: D/dalvikvm(5651): Trying to load lib libnativehelper.so 0x0
02-06 16:14:44.755: D/dalvikvm(5651): Added shared lib libnativehelper.so 0x0
02-06 16:14:44.895: D/AndroidRuntime(5651): Calling main entry com.android.commands.pm.Pm
02-06 16:14:44.895: D/AndroidRuntime(5651): Shutting down VM
02-06 16:14:44.895: D/dalvikvm(5651): Debugger has detached; object registry had 1 entries
02-06 16:14:44.895: I/AndroidRuntime(5651): NOTE: attach of thread 'Binder_1' failed
02-06 16:14:45.365: D/AndroidRuntime(5661): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-06 16:14:45.365: D/AndroidRuntime(5661): CheckJNI is OFF
02-06 16:14:45.375: D/dalvikvm(5661): Trying to load lib libjavacore.so 0x0
02-06 16:14:45.375: D/dalvikvm(5661): Added shared lib libjavacore.so 0x0
02-06 16:14:45.385: D/dalvikvm(5661): Trying to load lib libnativehelper.so 0x0
02-06 16:14:45.385: D/dalvikvm(5661): Added shared lib libnativehelper.so 0x0
02-06 16:14:45.515: D/AndroidRuntime(5661): Calling main entry com.android.commands.am.Am
02-06 16:14:45.525: D/dalvikvm(5661): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
02-06 16:14:45.525: I/ActivityManager(432): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.sonnet/.FullscreenActivity} from pid 5661
02-06 16:14:45.565: D/AndroidRuntime(5661): Shutting down VM
02-06 16:14:45.565: D/jdwp(5661): Got wake-up signal, bailing out of select
02-06 16:14:45.565: D/dalvikvm(5661): Debugger has detached; object registry had 1 entries
02-06 16:14:45.565: D/dalvikvm(5672): Late-enabling CheckJNI
02-06 16:14:45.575: I/ActivityManager(432): Start proc com.example.sonnet for activity com.example.sonnet/.FullscreenActivity: pid=5672 uid=10031 gids={50031, 3003, 1015, 1028}
02-06 16:14:45.595: D/dalvikvm(122): GC_EXPLICIT freed 40K, 2% free 7478K/7584K, paused 1ms+2ms, total 29ms
02-06 16:14:45.625: D/dalvikvm(122): GC_EXPLICIT freed <1K, 2% free 7478K/7584K, paused 1ms+2ms, total 27ms
02-06 16:14:45.655: D/dalvikvm(122): GC_EXPLICIT freed <1K, 2% free 7478K/7584K, paused 1ms+2ms, total 28ms
02-06 16:14:45.995: D/libEGL(5672): loaded /system/lib/egl/libEGL_tegra.so
02-06 16:14:46.035: D/libEGL(5672): loaded /system/lib/egl/libGLESv1_CM_tegra.so
02-06 16:14:46.055: D/libEGL(5672): loaded /system/lib/egl/libGLESv2_tegra.so
02-06 16:14:46.095: D/OpenGLRenderer(5672): Enabling debug mode 0
02-06 16:14:46.125: I/ActivityManager(432): Displayed com.example.sonnet/.FullscreenActivity: +566ms
02-06 16:14:46.395: D/TilesManager(5672): Starting TG #0, 0x641e71c8
02-06 16:14:46.395: D/TilesManager(5672): new EGLContext from framework: 62607d38
02-06 16:14:46.395: D/GLWebViewState(5672): Reinit shader
02-06 16:14:46.405: D/GLWebViewState(5672): Reinit transferQueue
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5698
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5709
02-06 16:14:48.705: W/ProcessStats(432): Skipping unknown process pid 5710
Looking at your manifest file, I see at least one problem:
1 - set the Google Play Services library for the application tag
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Then please make sure you have enabled the Google Maps API in the Google API console and that you are using the correct API Key according to the certificate you're using to sign the app.
All the procedure is described here: https://developers.google.com/maps/documentation/android/start
I am a beginner to android ... i am creating an app to load Google map v2.But it is not loading and keeps crashing every time with a message Unfortunatelyhas closed.Please help me to resolve the error..Thanks in advance..I am a regular follower stack overflow..
**my code**
**Main activity.java**
package com.mypack.test;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import android.os.Bundle;
import android.app.Activity;
import android.widget.Toast;
public class MainActivity extends Activity {
// Google Map
private GoogleMap googleMap;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try {
// Loading map
initilizeMap();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* function to load map. If map is not created it will create it for you
* */
private void initilizeMap() {
if (googleMap == null) {
googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
// check if map is created successfully or not
if (googleMap == null) {
Toast.makeText(getApplicationContext(),
"Sorry! unable to create maps", Toast.LENGTH_SHORT)
.show();
}
}
}
#Override
protected void onResume() {
super.onResume();
initilizeMap();
}
}
Test manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypack.test"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="com.mypack.test.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.mypack.test.permission.MAPS_RECEIVE" />
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.mypack.test.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<fragment
android:id="#+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
Logcat
09-19 09:23:08.785: E/Trace(803): error opening trace file: No such file or directory (2)
09-19 09:23:09.515: W/dalvikvm(803): VFY: unable to resolve static field 1065 (MapAttrs) in Lcom/google/android/gms/R$styleable;
09-19 09:23:09.515: D/dalvikvm(803): VFY: replacing opcode 0x62 at 0x000e
09-19 09:23:09.525: D/AndroidRuntime(803): Shutting down VM
09-19 09:23:09.525: W/dalvikvm(803): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
09-19 09:23:09.535: E/AndroidRuntime(803): FATAL EXCEPTION: main
09-19 09:23:09.535: E/AndroidRuntime(803): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.onCreateView(Activity.java:4716)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.setContentView(Activity.java:1881)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.mypack.test.MainActivity.onCreate(MainActivity.java:17)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Activity.performCreate(Activity.java:5104)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.os.Looper.loop(Looper.java:137)
09-19 09:23:09.535: E/AndroidRuntime(803): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 09:23:09.535: E/AndroidRuntime(803): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-19 09:23:09.535: E/AndroidRuntime(803): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-19 09:23:09.535: E/AndroidRuntime(803): at dalvik.system.NativeStart.main(Native Method)
new logcat after editing the previous code..and loading playservice and v4.jar
09-19 14:04:10.644: D/dalvikvm(1930): GC_CONCURRENT freed 1650K, 22% free 6514K/8284K, paused 76ms+19ms, total 279ms
09-19 14:04:10.644: D/dalvikvm(1930): WAIT_FOR_CONCURRENT_GC blocked 51ms
09-19 14:04:11.121: I/Choreographer(1930): Skipped 51 frames! The application may be doing too much work on its main thread.
09-19 14:04:13.281: I/Choreographer(1930): Skipped 170 frames! The application may be doing too much work on its main thread.
09-19 14:05:14.910: D/dalvikvm(1930): GC_CONCURRENT freed 85K, 7% free 7779K/8284K, paused 71ms+5ms, total 151ms
09-19 14:05:14.910: D/dalvikvm(1930): WAIT_FOR_CONCURRENT_GC blocked 64ms
09-19 14:05:15.040: E/MediaPlayer(1930): prepareAsync called in state 8
09-19 14:05:15.040: W/System.err(1930): java.lang.IllegalStateException
09-19 14:05:15.040: W/System.err(1930): at android.media.MediaPlayer.prepare(Native Method)
09-19 14:05:15.050: W/System.err(1930): at androassist.mypack.splash.onCreate(splash.java:38)
09-19 14:05:15.050: W/System.err(1930): at android.app.Activity.performCreate(Activity.java:5104)
09-19 14:05:15.060: W/System.err(1930): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-19 14:05:15.060: W/System.err(1930): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 14:05:15.060: W/System.err(1930): at android.os.Looper.loop(Looper.java:137)
09-19 14:05:15.060: W/System.err(1930): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-19 14:05:15.071: W/System.err(1930): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 14:05:15.071: W/System.err(1930): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 14:05:15.071: W/System.err(1930): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-19 14:05:15.080: W/System.err(1930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-19 14:05:15.080: W/System.err(1930): at dalvik.system.NativeStart.main(Native Method)
09-19 14:05:20.561: I/Choreographer(1930): Skipped 39 frames! The application may be doing too much work on its main thread.
09-19 14:05:21.551: I/Choreographer(1930): Skipped 222 frames! The application may be doing too much work on its main thread.
09-19 14:05:22.491: I/Choreographer(1930): Skipped 225 frames! The application may be doing too much work on its main thread.
09-19 14:05:26.330: W/IInputConnectionWrapper(1930): showStatusIcon on inactive InputConnection
09-19 14:05:28.770: D/Notice(1930): Entering log
09-19 14:05:28.920: D/Key(1930): key matched
09-19 14:05:32.620: I/Choreographer(1930): Skipped 783 frames! The application may be doing too much work on its main thread.
09-19 14:05:33.422: I/Choreographer(1930): Skipped 174 frames! The application may be doing too much work on its main thread.
09-19 14:05:35.290: I/Choreographer(1930): Skipped 55 frames! The application may be doing too much work on its main thread.
09-19 14:05:59.101: D/Notice(1930): Entering log
09-19 14:05:59.831: I/Choreographer(1930): Skipped 48 frames! The application may be doing too much work on its main thread.
09-19 14:06:00.600: I/MyApp(1930): Silent mode
09-19 14:06:00.710: I/Choreographer(1930): Skipped 115 frames! The application may be doing too much work on its main thread.
09-19 14:06:01.280: I/Choreographer(1930): Skipped 48 frames! The application may be doing too much work on its main thread.
09-19 14:06:15.223: D/Notice(1930): Entering log
09-19 14:06:15.900: I/Choreographer(1930): Skipped 54 frames! The application may be doing too much work on its main thread.
09-19 14:06:16.712: I/MyApp(1930): Silent mode
09-19 14:06:16.930: I/Choreographer(1930): Skipped 187 frames! The application may be doing too much work on its main thread.
09-19 14:06:17.620: I/Choreographer(1930): Skipped 92 frames! The application may be doing too much work on its main thread.
09-19 14:06:26.514: D/Notice(1930): Entering log
09-19 14:06:27.103: I/Choreographer(1930): Skipped 50 frames! The application may be doing too much work on its main thread.
09-19 14:06:28.241: D/GPS(1930): GPS Enabled
09-19 14:06:28.265: D/loc message:(1930): fmygpslo(0.00.0)
09-19 14:06:28.731: I/Choreographer(1930): Skipped 381 frames! The application may be doing too much work on its main thread.
09-19 14:06:34.700: I/Choreographer(1930): Skipped 177 frames! The application may be doing too much work on its main thread.
Thank you for spending your valuable time.I got the solution...it was my mistake...
As Reghunandan and Patrik said.It is problem with referencing google playstore services..my app references google playstore services from SDK directory,not from the loaded version of google playstore in my workspace.So the above errors are cleared..While running app the map is not loading..I checked it with the following code
package myapp.mypack;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.widget.Toast;
public class MapActivity extends FragmentActivity {
String msgtype,sendernum;
// Google Map
private GoogleMap googleMap;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(check())
{
setContentView(R.layout.app_main);
Toast.makeText(this, "In Google play service.", Toast.LENGTH_LONG).show();
initFun();
}
else
{
Toast.makeText(this, "Google play service not available.", Toast.LENGTH_LONG).show();
}
}
private Boolean check()
{
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if(status==ConnectionResult.SUCCESS)
{
return true;
}
return false;
}
public void initFun()
{
SupportMapFragment sp = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
googleMap = sp.getMap();
googleMap.setMyLocationEnabled(true);
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.map, menu);
return true;
}
}
Android manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myapp.mypack"
android:versionCode="1"
android:versionName="1.0" >
<permission
android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="myapp.mypack.googlemapsv2.permission.MAPS_RECEIVE"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<!-- Required to show current location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Required OpenGL ES 2.0. for Maps V2 -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="myapp.mypack.MapActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Goolge API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDnHxpS7Pb6YeKBmyWjV_Slj9mIjo6M1FM" />
</application>
</manifest>
But my map is loading...Instead it gives a while screen and displays
"Google play service not available." as specified in the code..but i checked my project>properties>android. google playstore library is there with a green tick mark.
So think it is the problem with my playstore version..*i run the app in my galaxy s3 mini.But it also shows the same white screen..my playstore build version in phone is:4.3.11.The only solution i have is to update playstore and rerun my app.The logcat also shows my mobile phone's playsore version need to be updated..Guys please have a look at my queries..Is it the problem with my phone's playstore version..*
logcat
09-20 01:19:51.980: E/Trace(26515): error opening trace file: No such file or directory (2)
09-20 01:19:52.020: W/GooglePlayServicesUtil(26515): Google Play services out of date. Requires 3264100 but found 3225134
09-20 01:19:52.190: D/libEGL(26515): loaded /system/lib/egl/libEGL_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv1_CM_mali.so
09-20 01:19:52.210: D/libEGL(26515): loaded /system/lib/egl/libGLESv2_mali.so
09-20 01:19:52.240: D/OpenGLRenderer(26515): Enabling debug mode 0
**Please help me to find a solution?**
private void initilizeMap() {
if (googleMap == null) {
MapFragment mapFragment = (MapFragment)getFragmentManager().findFragmentById(R.id.map);
googleMap = mapFragment.getMap();
// check if map is created successfully or not
if (googleMap == null) {
Toast.makeText(getApplicationContext(),
"Sorry! unable to create maps", Toast.LENGTH_SHORT)
.show();
}
}
}
run it on device..
I am tring to implement google maps using the new google maps api v2 and for some reason i don't see a map.
I think that the problem is those two lines of error when i run it on the emulator:
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
when i run the application on the device the following error is produced:
Could not find class 'maps.j.k', referenced from method map.y.ae.a
My problem looks the same as in this link: http://android-er.blogspot.co.il/2012/12/google-maps-android-api-v2-with-blank.html
There it's says that the problem may be my key so i went and reproduced it using the following tutorial: http://android-er.blogspot.co.il/2012/12/displaying-sha1-certificate-fingerprint.html. but this still didn't helped me.
the support files are of course add to the project as well as the Google play services lib.
I see the same result on the emulator (after adding manually the two file that allow using the google map v2 on the emulator) as well as on the motorola Defy running android 2.2.
Maybe I am using the wrong debug.keystore? I am using the one in my User.android folder.If so then how do i find the right file?
EDIT: My eclipse says that my debug key is in the default folder. So i renamed the debug.keystore file and ran the Eclipse to recreate it all over again. That resulted in producing a new SHA1 key. I used it to create a new Google Maps API v2 key but the result is still the same. I'm still unable to see the map.
EDIT2: Stupid me, I chose Google Map API V2 instead of Google Maps Android API V2.
This question can be closed. Thanks.
Here are all the code files:
xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="#+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:cameraBearing="112.5"
map:cameraTargetLat="-33.796923"
map:cameraTargetLng="150.922433"
map:cameraTilt="30"
map:cameraZoom="13"
map:mapType="normal"
map:uiCompass="false"
map:uiRotateGestures="true"
map:uiScrollGestures="false"
map:uiTiltGestures="true"
map:uiZoomGestures="true" />
</LinearLayout>
Map Fragmentactivity class:
package com.eadesign.skygiraffefinalv2;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.GoogleMap;
import android.os.Bundle;
import com.google.android.gms.maps.*;
import android.widget.ImageView;
import android.widget.TextView;
public class Map extends android.support.v4.app.FragmentActivity
{
private GoogleMap map;
#Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == 0)
{
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
// map.setMapType(GoogleMap.MAP_TYPE_HYBRID);
}
}}
manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eadesign.skygiraffefinalv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
<permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/sgicon90"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen">
<activity
android:name=".Map"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="My key"/>
</application>
log from logcat:
ent.category.LAUNCHER] flg=0x10000000 cmp=com.eadesign.skygiraffefinalv2/.Map u=
0} from pid 1362
W/WindowManager( 148): Failure taking screenshot for (246x410) to layer 21010
D/AndroidRuntime( 1362): Shutting down VM
I/ActivityManager( 148): Start proc com.eadesign.skygiraffefinalv2 for activity
com.eadesign.skygiraffefinalv2/.Map: pid=1373 uid=10046 gids={3003, 1015, 1028}
D/dalvikvm( 1373): Not late-enabling CheckJNI (already on)
D/dalvikvm( 1362): GC_CONCURRENT freed 99K, 77% free 483K/2048K, paused 1ms+1ms,
total 13ms
D/jdwp ( 1362): Got wake-up signal, bailing out of select
D/dalvikvm( 1362): Debugger has detached; object registry had 1 entries
E/jdwp ( 1373): Failed sending reply to debugger: Broken pipe
D/dalvikvm( 1373): Debugger has detached; object registry had 2 entries
E/Trace ( 1373): error opening trace file: No such file or directory (2)
D/dalvikvm( 1373): GC_CONCURRENT freed 204K, 3% free 8264K/8519K, paused 89ms+6m
s, total 161ms
D/dalvikvm( 1373): WAIT_FOR_CONCURRENT_GC blocked 33ms
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
E/ActivityThread( 1373): Failed to find provider info for com.google.settings
D/dalvikvm( 1373): GC_CONCURRENT freed 312K, 5% free 8471K/8839K, paused 82ms+10
5ms, total 268ms
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf
.gservices
D/dalvikvm( 1373): GC_CONCURRENT freed 227K, 4% free 8797K/9095K, paused 91ms+11
0ms, total 300ms
D/libEGL ( 1373): Emulator without GPU support detected. Fallback to software r
enderer.
I/Choreographer( 1373): Skipped 54 frames! The application may be doing too muc
h work on its main thread.
D/gralloc_goldfish( 1373): Emulator without GPU emulation detected.
D/libEGL ( 1373): loaded /system/lib/egl/libGLES_android.so
I/ActivityManager( 148): Displayed com.eadesign.skygiraffefinalv2/.Map: +3s545ms
I/Choreographer( 1373): Skipped 75 frames! The application may be doing too muc
h work on its main thread.
In my case I chose Google Maps API V2 instead of Google Maps Android API V2. After changing that the problem was gone. So this code is perfectly fine to create a full screen Google map and the question can be closed.
Thanks.
I have a problem using ActionBarSherlock in one of my projects. My App installs fine when pushing it to my Nexus 4, but when I try to install it to my HTC Desire (CM7 with Android 2.3.7 - API Level 10) I get the following error.
[2013-02-03 18:47:44 - MyApp] Project dependency found, installing: Actionbar
[2013-02-03 18:47:44 - Actionbar] Uploading Actionbar.apk onto device 'HT042PL03910'
[2013-02-03 18:47:44 - Actionbar] Installing Actionbar.apk...
[2013-02-03 18:47:47 - Actionbar] Installation error: INSTALL_FAILED_OLDER_SDK
[2013-02-03 18:47:47 - Actionbar] Please check logcat output for more details.
[2013-02-03 18:47:47 - MyApp] Launch canceled!
I am using Sherlock 4.2.0 as a libraryproject and added the R11 of android-support-v4. Sherlock itself is configured like this:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Project-Properties:
android.library=true
# Project target.
target=android-14
My application uses the following settings:
Manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />
Project-Properties:
target=Google Inc.:Google APIs:16
android.library.reference.1=../ActionbarSherlock
I went through the whole logcat output but couldn't find anything helpful. Has anybody else experienced this and can help me?
========= EDIT ===============
Manifest of my App (mindSdk changed to 8):
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.hsrm.medieninf.mobcomp.klingelapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<permission
android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE" />
<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock.Light" >
<uses-library android:name="com.google.android.maps" />
(...Activities and Services here ...)
</application>
</manifest>
Full Logcat from new Emulator AVD with Google APIs Level 10:
02-03 21:09:59.647: I/PackageManager(77): Removing non-system package:de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.647: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:09:59.877: D/dalvikvm(77): GC_CONCURRENT freed 1369K, 49% free 5484K/10631K, external 3226K/4029K, paused 4ms+12ms
02-03 21:09:59.977: D/PackageManager(77): Scanning package de.hsrm.medieninf.mobcomp.klingelapp
02-03 21:09:59.977: I/PackageManager(77): Package de.hsrm.medieninf.mobcomp.klingelapp codePath changed from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk; Retaining data and using new
02-03 21:09:59.977: I/PackageManager(77): Unpacking native libraries for /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:00.047: D/installd(35): DexInv: --- BEGIN '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' ---
02-03 21:10:04.096: D/dalvikvm(598): DexOpt: load 250ms, verify+opt 957ms
02-03 21:10:04.306: D/installd(35): DexInv: --- END '/data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk' (success) ---
02-03 21:10:04.306: W/PackageManager(77): Code path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: W/PackageManager(77): Resource path for pkg : de.hsrm.medieninf.mobcomp.klingelapp changing from /data/app/de.hsrm.medieninf.mobcomp.klingelapp-1.apk to /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.306: D/PackageManager(77): Services: de.hsrm.medieninf.mobcomp.klingelapp.GCMIntentService de.hsrm.medieninf.mobcomp.klingelapp.services.LocationService de.hsrm.medieninf.mobcomp.klingelapp.services.SyncService de.hsrm.medieninf.mobcomp.klingelapp.services.AppService de.hsrm.medieninf.mobcomp.klingelapp.services.AuthService
02-03 21:10:04.306: D/PackageManager(77): Receivers: com.google.android.gcm.GCMBroadcastReceiver
02-03 21:10:04.306: D/PackageManager(77): Activities: de.hsrm.medieninf.mobcomp.klingelapp.ui.LoginActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageEditor de.hsrm.medieninf.mobcomp.klingelapp.ui.StartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.ContactsActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.KlingelSettings de.hsrm.medieninf.mobcomp.klingelapp.ui.NewStartActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessagesActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.MessageDetails de.hsrm.medieninf.mobcomp.klingelapp.ui.RegisterActivity de.hsrm.medieninf.mobcomp.klingelapp.ui.FriendRequestActivity
02-03 21:10:04.306: D/PackageManager(77): Permissions: de.hsrm.medieninf.mobcomp.klingelapp.permission.C2D_MESSAGE
02-03 21:10:04.326: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.436: I/installd(35): move /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex -> /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-2.apk#classes.dex
02-03 21:10:04.436: D/PackageManager(77): New package installed in /data/app/de.hsrm.medieninf.mobcomp.klingelapp-2.apk
02-03 21:10:04.446: W/PackageManager(77): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
02-03 21:10:04.446: W/PackageManager(77): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x9be45)
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings
02-03 21:10:04.457: W/PackageManager(77): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings
02-03 21:10:04.466: W/PackageManager(77): Unknown permission android.permission.READ_OWNER_DATA in package com.android.email
02-03 21:10:04.476: W/PackageManager(77): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
02-03 21:10:04.476: W/PackageManager(77): Not granting permission android.permission.DEVICE_POWER to package com.android.deskclock (protectionLevel=2 flags=0x8be45)
02-03 21:10:04.606: I/ActivityManager(77): Force stopping package de.hsrm.medieninf.mobcomp.klingelapp uid=10038
02-03 21:10:04.706: D/dalvikvm(260): GC_EXPLICIT freed 1K, 49% free 3020K/5831K, external 4756K/5631K, paused 67ms
02-03 21:10:04.746: D/dalvikvm(226): GC_EXPLICIT freed 94K, 51% free 2964K/5959K, external 1625K/2137K, paused 75ms
02-03 21:10:04.806: W/RecognitionManagerService(77): no available voice recognition services found
02-03 21:10:04.856: D/GTalkService(287): handlePackageInstalled: re-initialize providers
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
02-03 21:10:04.856: D/GTalkService(287): [RawStanzaProvidersMgr] no intent receivers found
02-03 21:10:05.136: I/Launcher(260): setLoadOnResume
02-03 21:10:05.226: D/dalvikvm(77): GC_EXPLICIT freed 1202K, 54% free 4962K/10631K, external 3226K/4029K, paused 75ms
02-03 21:10:05.256: I/installd(35): unlink /data/dalvik-cache/data#app#de.hsrm.medieninf.mobcomp.klingelapp-1.apk#classes.dex
02-03 21:10:05.296: D/AndroidRuntime(589): Shutting down VM
02-03 21:10:05.306: D/dalvikvm(589): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 0ms+1ms
02-03 21:10:05.306: D/jdwp(589): Got wake-up signal, bailing out of select
02-03 21:10:05.306: D/dalvikvm(589): Debugger has detached; object registry had 1 entries
02-03 21:10:05.326: I/dalvikvm(589): JNI: AttachCurrentThread (from ???.???)
02-03 21:10:05.326: I/AndroidRuntime(589): NOTE: attach of thread 'Binder Thread #3' failed
02-03 21:10:06.686: D/AndroidRuntime(604): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-03 21:10:06.686: D/AndroidRuntime(604): CheckJNI is ON
02-03 21:10:07.106: D/AndroidRuntime(604): Calling main entry com.android.commands.pm.Pm
02-03 21:10:07.196: D/dalvikvm(442): GC_EXPLICIT freed 10K, 51% free 2727K/5511K, external 1625K/2137K, paused 43ms
02-03 21:10:07.206: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.306: W/ActivityManager(77): No content provider found for:
02-03 21:10:07.316: D/PackageParser(77): Scanning package: /data/app/vmdl-63285559.tmp
02-03 21:10:07.326: W/PackageParser(77): /data/app/vmdl-63285559.tmp (at Binary XML file line #8): Requires newer sdk version #16 (current version is #10)
So instead of searching for where I went wrong, I checked out a working revision without sherlock. I then added sherlock as a library and made the same changes to my activites I did yesterday. But now, install works fine.
I have downloaded a fresh copy of Phonegap/Cordova to see why my application continually throws some errors.
I followed the "getting started" from Phonegap and ended up with Hello World working on my device (HTC DesireHD with Android 2.3.3).
So this application does nothing as such, just prints hello world on the device.
The application works which is great however I get some unpleasant error messages in my Logs:
Specifically:
09-06 17:26:31.487: E/dalvikvm(32594): Could not find class
'android.webkit.WebResourceResponse', referenced from method
org.apache.cordova.CordovaWebViewClient.generateWebResourceResponse
09-06 17:26:31.487: W/dalvikvm(32594): VFY: unable to resolve
new-instance 452 (Landroid/webkit/WebResourceResponse;) in
Lorg/apache/cordova/CordovaWebViewClient;
I then get other related errors repeating.
I repeat that the application works but I would really like not to see any errors in the logs :-)
Other people have mentioned that it might be due to the name of my libs folder (it is correctly named libs with the "s")
I have included below copies of my AndroidManifest.xml, my MainActivity.java and the complete LogCat.
I am using Win7, Eclipse 3.8.
Thanks very much for any help.
AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.qwentes.phonegaptest" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15" />
<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<application android:icon="#drawable/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme">
<activity android:name=".MainActivity" android:label="#string/title_activity_main" android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
MainActivity.java
package com.qwentes.phonegaptest;
import android.os.Bundle;
import org.apache.cordova.*;
public class MainActivity extends DroidGap {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
}
LogCat.txt
09-06 17:26:29.265: I/dalvikvm(32594): Could not find method android.webkit.WebView.<init>, referenced from method org.apache.cordova.CordovaWebView.<init>
09-06 17:26:29.265: W/dalvikvm(32594): VFY: unable to resolve direct method 3117: Landroid/webkit/WebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
09-06 17:26:29.265: D/dalvikvm(32594): VFY: replacing opcode 0x70 at 0x0001
09-06 17:26:29.265: D/dalvikvm(32594): VFY: dead code 0x0004-0059 in Lorg/apache/cordova/CordovaWebView;.<init> (Landroid/content/Context;Landroid/util/AttributeSet;IZ)V
09-06 17:26:29.705: D/Database(32594): dbopen(): path = /data/data/com.qwentes.phonegaptest/databases/webview.db, flag = 6, cannot stat file, errno: 2,message: No such file or directory
09-06 17:26:29.705: D/Database(32594): dbopen(): path = /data/data/com.qwentes.phonegaptest/databases/webview.db, mode: delete, disk free size: 554 M, handle: 0x34d960
09-06 17:26:30.606: V/webviewdatabase(32594): TCP pre connection: creating table in database
09-06 17:26:30.897: D/Database(32594): dbopen(): path = /data/data/com.qwentes.phonegaptest/databases/webviewCache.db, flag = 6, cannot stat file, errno: 2,message: No such file or directory
09-06 17:26:30.897: D/Database(32594): dbopen(): path = /data/data/com.qwentes.phonegaptest/databases/webviewCache.db, mode: delete, disk free size: 554 M, handle: 0x372128
09-06 17:26:31.467: D/skia(32594): htcFlashPlugin::htcFlashPlugin
09-06 17:26:31.477: D/qct(32594): [WebView.WebView] >> Enable Shutdown = true
09-06 17:26:31.477: I/CordovaLog(32594): Changing log level to DEBUG(3)
09-06 17:26:31.477: I/CordovaLog(32594): Found preference for useBrowserHistory=false
09-06 17:26:31.477: D/CordovaLog(32594): Found preference for useBrowserHistory=false
09-06 17:26:31.487: E/dalvikvm(32594): Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generateWebResourceResponse
09-06 17:26:31.487: W/dalvikvm(32594): VFY: unable to resolve new-instance 452 (Landroid/webkit/WebResourceResponse;) in Lorg/apache/cordova/CordovaWebViewClient;
09-06 17:26:31.487: D/dalvikvm(32594): VFY: replacing opcode 0x22 at 0x0046
09-06 17:26:31.487: W/dalvikvm(32594): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
09-06 17:26:31.487: D/dalvikvm(32594): VFY: dead code 0x0048-004c in Lorg/apache/cordova/CordovaWebViewClient;.generateWebResourceResponse (Ljava/lang/String;)Landroid/webkit/WebResourceResponse;
09-06 17:26:31.527: W/dalvikvm(32594): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
09-06 17:26:31.527: W/dalvikvm(32594): VFY: unable to find class referenced in signature (Landroid/webkit/WebResourceResponse;)
09-06 17:26:31.527: I/dalvikvm(32594): Could not find method android.webkit.WebViewClient.shouldInterceptRequest, referenced from method org.apache.cordova.CordovaWebViewClient.shouldInterceptRequest
09-06 17:26:31.527: W/dalvikvm(32594): VFY: unable to resolve virtual method 3129: Landroid/webkit/WebViewClient;.shouldInterceptRequest (Landroid/webkit/WebView;Ljava/lang/String;)Landroid/webkit/WebResourceResponse;
09-06 17:26:31.527: D/dalvikvm(32594): VFY: replacing opcode 0x6f at 0x0015
09-06 17:26:31.527: D/dalvikvm(32594): VFY: dead code 0x0018-0019 in Lorg/apache/cordova/CordovaWebViewClient;.shouldInterceptRequest (Landroid/webkit/WebView;Ljava/lang/String;)Landroid/webkit/WebResourceResponse;
09-06 17:26:31.527: D/DroidGap(32594): DroidGap.init()
09-06 17:26:31.547: D/CordovaWebView(32594): >>> loadUrl(file:///android_asset/www/index.html)
09-06 17:26:31.547: D/PluginManager(32594): init()
09-06 17:26:31.547: D/CordovaWebView(32594): >>> loadUrlNow()
09-06 17:26:31.587: D/ATRecorder(32594): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#4053e810
09-06 17:26:31.597: D/WindowManagerImpl(32594): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView#4053ada8
09-06 17:26:31.597: D/SoftKeyboardDetect(32594): Ignore this event
09-06 17:26:31.687: W/webcore(32594): Not supported in this case.
09-06 17:26:31.687: D/SoftKeyboardDetect(32594): Ignore this event
09-06 17:26:31.817: D/qct(32594): [RequestQueue.ActivePool.ActivePool] >> Enable Shutdown = true
09-06 17:26:31.817: D/qct(32594): [IdleCache.IdleCache] >> IDLE_CACHE_MAX = 40
09-06 17:26:32.418: D/DroidGap(32594): onMessage(onPageStarted,file:///android_asset/www/index.html)
09-06 17:26:32.558: D/szipinf(32594): Initializing inflate state
09-06 17:26:32.558: D/szipinf(32594): Initializing zlib to inflate
09-06 17:26:32.618: D/webkit-timers(32594): [JWebCoreJavaBridge::resume] >> do resume
09-06 17:26:32.738: D/dalvikvm(32594): GC_CONCURRENT freed 134K, 44% free 3208K/5639K, external 0K/0K, paused 2ms+20ms
09-06 17:26:33.729: D/Cordova(32594): onPageFinished(file:///android_asset/www/index.html)
09-06 17:26:33.729: D/CordovaWebView(32594): >>> loadUrlNow()
09-06 17:26:33.729: D/DroidGap(32594): onMessage(onNativeReady,null)
09-06 17:26:33.729: D/DroidGap(32594): onMessage(onPageFinished,file:///android_asset/www/index.html)
09-06 17:26:34.030: I/Database(32594): sqlite returned: error code = 14, msg = cannot open file at line 27206 of [42537b6056]
09-06 17:26:34.190: D/DroidGap(32594): onMessage(networkconnection,wifi)
09-06 17:26:34.230: D/DroidGap(32594): onMessage(spinner,stop)
09-06 17:26:35.741: D/DroidGap(32594): onMessage(spinner,stop)
09-06 17:26:44.430: D/dalvikvm(32594): GC_CONCURRENT freed 376K, 46% free 3284K/6023K, external 0K/0K, paused 2ms+3ms
09-06 17:27:34.619: D/dalvikvm(32594): GC_FOR_MALLOC freed 586K, 50% free 3133K/6151K, external 0K/0K, paused 43ms
09-06 17:28:04.808: D/dalvikvm(32594): GC_CONCURRENT freed 357K, 48% free 3208K/6151K, external 0K/0K, paused 6ms+3ms
There is nothing you can do about those nasty logs in 2.0.0 but they will go away in 2.1.0 which should be out within the week. They are fixed by this commit:
https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=commit;h=07439ff99ca5f61c444ae7673d9fec96e4502492