I was trying to upgrade my application to the latest Titanium SDK (5.2.2). It works fine on iOS but having some issues on Android. The app crashes after changing the SDK version.
The app uses camera, storage and locations. So, added the permissions for that. Here is a part of my tiapp.xml file for the same:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<!--CHANGE added package for iBeacon support for android -->
<manifest android:versionCode="16" android:versionName="2.12" package="me.AppName.app">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
<!-- Allows the API to download data from Google Map servers -->
<uses-permission android:name="android.permission.ACCESS_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_GPS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Allows the API to cache data -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Use GPS for device location -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- Use Wi-Fi or mobile connection for device location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!-- Allows the API to access Google web-based services -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- Specify OpenGL ES 2.0 as a requirement -->
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<!-- Replace com.domain.appid with your application ID -->
<uses-permission android:name="me.AppName.app.permission.MAPS_RECEIVE"/>
<!--CHANGE permissions for iBeacon -->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<!-- * -->
<permission
android:name="me.AppName.app.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application android:hardwareAccelerated="true" android:theme="#style/Theme.NoActionBar">
<activity
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:name=".AppNameActivity"
android:screenOrientation="portrait" android:theme="#style/Theme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="AppName"/>
</intent-filter>
</activity>
<activity
android:configChanges="keyboardHidden|orientation|screenSize"
android:name="org.appcelerator.titanium.TiActivity" android:screenOrientation="portrait"/>
<activity
android:configChanges="keyboardHidden|orientation|screenSize"
android:name="org.appcelerator.titanium.TiTranslucentActivity"
android:screenOrientation="portrait" android:theme="#style/Theme.NoActionBar"/>
<activity android:configChanges="screenSize" android:name="ti.modules.titanium.ui.android.TiPreferencesActivity"/>
<activity
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="AppName"
android:name="com.facebook.FacebookActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
<activity android:label=“AppName”
android:name="com.facebook.LoginActivity" android:theme="#android:style/Theme.Translucent.NoTitleBar"/>
<uses-library android:name="com.google.android.maps"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
<meta-data
android:name="com.google.android.maps.v2.API_KEY" android:value=“SomeKey”/>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
<!--CHANGE added services for iBeacon support for android -->
<service android:enabled="true" android:exported="true"
android:isolatedProcess="false"
android:label="iBeacon" android:name="com.radiusnetworks.ibeacon.service.IBeaconService"/>
<service android:enabled="true" android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
<meta-data android:name="background" android:value="true"/>
<intent-filter android:priority="1">
<action android:name="me.AppName.app.DID_RANGING"/>
<action android:name="me.AppName.app.DID_MONITORING"/>
</intent-filter>
</service>
<!-- * -->
</application>
</manifest>
</android>
This is a part of my logcat response:
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.appcelerator.titanium.util.TiFileHelper2.hasStoragePermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0017
[WARN] : V8Object: (KrollRuntimeThread) [196,197] Runtime disposed, cannot set property 'userAgent'
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasStoragePermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.media.MediaModule.requestCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 88: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0037
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.filesystem.FilesystemModule.hasStoragePermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 33: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0012
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.filesystem.FilesystemModule.requestStoragePermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 88: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[DEBUG] : dalvikvm: VFY: replacing opcode 0x6e at 0x0025
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.compression.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libcom.liferay.beacons.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.map.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.barcode.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libti.styledlabel.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/libfacebook.so 0x4193fb00, skipping init
[DEBUG] : dalvikvm: Trying to load lib /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00
[DEBUG] : dalvikvm: Added shared lib /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00
[DEBUG] : dalvikvm: No JNI_OnLoad found in /data/app-lib/me.AppName.app-2/liborg.iotashan.TiTouchImageView.so 0x4193fb00, skipping init
[WARN] : dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
[INFO] : dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onSearchRequested
[WARN] : dalvikvm: VFY: unable to resolve interface method 15187: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
[DEBUG] : dalvikvm: VFY: replacing opcode 0x72 at 0x0002
[INFO] : dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onWindowStartingActionMode
[WARN] : dalvikvm: VFY: unable to resolve interface method 15191: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
[DEBUG] : dalvikvm: VFY: replacing opcode 0x72 at 0x0002
[DEBUG] : dalvikvm: GC_FOR_ALLOC freed 4331K, 32%% free 10408K/15164K, paused 19ms, total 19ms
[DEBUG] : AndroidRuntime: Shutting down VM
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41661d40)
What could be the possible problem here? Can anyone look around?
Thanks!
Related
I have problem with my first application in Android Studio-Cordova.
I used for my application html,css, jquery and sql.
The application is correct, because I'm attending an on-line course with related code.
It starts, but the message of creating db isn't appeared.
the log of Android Studio is this:
Client not ready yet..Waiting for process to come online
Connected to process 2679 on device Nexus_5_API_19_armeabi_v7a [emulator-5554]
I/InstantRun: Instant Run Runtime started. Android package is com.videocorsi.test, real application class is null.
W/InstantRun: No instant run dex files added to classpath
I/CordovaLog: Changing log level to DEBUG(3)
I/CordovaActivity: Apache Cordova native platform version 6.0.0 is starting
D/CordovaActivity: CordovaActivity.onCreate()
I/dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission
W/dalvikvm: VFY: unable to resolve virtual method 2: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions
W/dalvikvm: VFY: unable to resolve virtual method 136: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0029
V/WebViewChromium: Binding Chromium to the background looper Looper (main, tid 1) {9dd95220}
I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserProcessMain: Initializing chromium process, renderers=0
W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
D/dalvikvm: GC_FOR_ALLOC freed 142K, 12% free 3463K/3892K, paused 86ms, total 88ms
I/dalvikvm-heap: Grow heap (frag case) to 6.078MB for 2536936-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 0K, 7% free 5941K/6372K, paused 58ms, total 58ms
I/dalvikvm: Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init>
W/dalvikvm: VFY: unable to resolve virtual method 953: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0046
I/dalvikvm: Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
W/dalvikvm: VFY: unable to resolve virtual method 947: Landroid/webkit/CookieManager;.flush ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0019
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
I/dalvikvm: Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
W/dalvikvm: VFY: unable to resolve virtual method 1147: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0031
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;)
I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest
W/dalvikvm: VFY: unable to resolve virtual method 964: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
W/dalvikvm: VFY: unable to resolve virtual method 969: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0021
D/SystemWebViewEngine: CordovaWebView is running on device made by: unknown
D/PluginManager: init()
D/CordovaWebViewImpl: >>> loadUrl(file:///android_asset/www/index.html)
D/CordovaActivity: Started the activity.
D/CordovaActivity: Resumed the activity.
D/OpenGLRenderer: Enabling debug mode 0
I/Choreographer: Skipped 81 frames! The application may be doing too much work on its main thread.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/Choreographer: Skipped 74 frames! The application may be doing too much work on its main thread.
D/SystemWebChromeClient: file:///android_asset/www/cordova_plugins.js: Line 7 : Uncaught SyntaxError: Unexpected string
I/chromium: [INFO:CONSOLE(7)] "Uncaught SyntaxError: Unexpected string", source: file:///android_asset/www/cordova_plugins.js (7)
D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 39 : Uncaught ReferenceError: listeningElement is not defined
I/chromium: [INFO:CONSOLE(39)] "Uncaught ReferenceError: listeningElement is not defined", source: file:///android_asset/www/js/index.js (39)
D/SystemWebChromeClient: file:///android_asset/www/index.html: Line 237 : Uncaught TypeError: Cannot call method 'transaction' of undefined
I/chromium: [INFO:CONSOLE(237)] "Uncaught TypeError: Cannot call method 'transaction' of undefined", source: file:///android_asset/www/index.html (237)
What Can I do?
the problem was in this file index.js . I had commented this:
receivedEvent: function(id) { var parentElement =document.getElementById(id);
// var listeningElement = parentElement.querySelector('.listening');
//var receivedElement = parentElement.querySelector('.received');
// listeningElement.setAttribute('style', 'display:none;'); //receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id); }
Then, I had move the tag script with my js/jquery code at the end of the tag
I've a problem with my Titanium Android application. The app works correctly in iOS, but not in Android.
I get the following error:
V8Object: (KrollRuntimeThread) [88,88] Runtime disposed, cannot set property 'userAgent'
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermission
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasStoragePermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 27: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.media.MediaModule.requestCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 80: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[WARN] : dalvikvm: threadid=10: thread exiting with uncaught exception (group=0x41fe92a0)
Can anybody help me help me?
Sory for the previos unformatted message.I send a screenshot of log file.
android crashed log
This issue relates V8Object: (KrollRuntimeThread) Runtime disposed, cannot set property 'userAge. Check the link
I programmed an application with titanium appcelerator.
I've been trying to work days but no way.I have tried everything I found on the internet without solution.
The fact is that there is no way to display a mapview on a smartphone with android 2.3 but if it works well on android 4 and above.
I only see the grid and zoom controls on adroid 2.3.
I have successfully installed Google Play Services in the latest version, I've had add mapview directly to the window without success, I have also tried modal window set to false and nothing.
The Api Key I have it configured correctly since I uploaded the application to Google Play and working properly as I said in android 4 and above.
SDK 3.2.3 / 3.3.0
tiapp.xml
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:installLocation="preferExternal"
android:versionCode="10" android:versionName="1.2.0">
<application android:hardwareAccelerated="true" android:largeHeap="true"/>
<uses-sdk android:maxSdkVersion="19"
android:minSdkVersion="10" android:targetSdkVersion="19"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="com.example.app.permission.MAPS_RECEIVE"/>
<permission android:name="com.example.app.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application>
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="XXX"/>
</application>
</manifest>
</android>
.js
var Map = require('ti.map');
var mapview = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {latitude: 40.6854154,
longitude: -17.88848876953125,
latitudeDelta:0.1, longitudeDelta:0.1},
animate:true,
regionFit:true,
userLocation:true,
annotations:[pointIni,pointFin]
});
I need help, thanks.
Hi here is the debug log mode in android 2.3 device.
One of the log messages is not installed Google Play Services but I assure you if this.
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1618 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1614 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1629 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1626 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1622 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1620 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1626 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1615 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1612 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1627 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1617 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1616 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1613 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1628 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1625 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1621 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1619 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 1624 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve instance field 42
[WARN] : dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[INFO] : Google Play services is installed.
[INFO] : TiVerify: (Timer-0) [980,4266] Succesfully verified module licenses
[INFO] : dalvikvm: Jit: resizing JitTable from 1024 to 2048
[WARN] : dalvikvm: VFY: unable to resolve static field 1633 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[INFO] : I/Google Maps Android API: Google Play services client version: 4132500
[INFO] : dalvikvm: Could not find method gui.a, referenced from method gqh.a
[WARN] : dalvikvm: VFY: unable to resolve static method 24934: Lgui;.a (Landroid/content/Context;)Lgrh;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[WARN] : dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] : dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[INFO] : I/Google Maps Android API: Google Play services package version: 5089012
[WARN] : dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[WARN] : dalvikvm: Unable to resolve superclass of Lotj; (653)
[WARN] : dalvikvm: Link of class 'Lotj;' failed
[WARN] : dalvikvm: Unable to resolve superclass of Lokj; (8003)
[WARN] : dalvikvm: Link of class 'Lokj;' failed
[WARN] : dalvikvm: Unable to resolve superclass of Lovw; (7709)
[WARN] : dalvikvm: Link of class 'Lovw;' failed
[ERROR] : dalvikvm: Could not find class 'ovw', referenced from method oyf.a
[WARN] : dalvikvm: VFY: unable to resolve new-instance 8070 (Lovw;) in Loyf;
[WARN] : dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[INFO] : dalvikvm: Could not find method android.content.Context.registerComponentCallbacks, referenced from method oze.registerComponentCallbacks
[WARN] : dalvikvm: VFY: unable to resolve virtual method 1553: Landroid/content/Context;.registerComponentCallbacks (Landroid/content/ComponentCallbacks;)V
[INFO] : dalvikvm: Could not find method android.content.Context.unregisterComponentCallbacks, referenced from method oze.unregisterComponentCallbacks
[WARN] : dalvikvm: VFY: unable to resolve virtual method 1566: Landroid/content/Context;.unregisterComponentCallbacks (Landroid/content/ComponentCallbacks;)V
[INFO] : dalvikvm: Could not find method osw.dispatchHoverEvent, referenced from method oli.dispatchHoverEvent
[WARN] : dalvikvm: VFY: unable to resolve virtual method 44561: Losw;.dispatchHoverEvent (Landroid/view/MotionEvent;)Z
[INFO] : dalvikvm: Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
[ERROR] : dalvikvm: Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a
[WARN] : dalvikvm: Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
[WARN] : dalvikvm: VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lgls;
[INFO] : dalvikvm: Could not find method android.app.Activity.getFragmentManager, referenced from method bmo.a
[WARN] : dalvikvm: VFY: unable to resolve virtual method 1187: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
[WARN] : dalvikvm: VFY: unable to resolve instance field 675
[INFO] : dalvikvm: Could not find method android.app.AlertDialog$Builder.<init>, referenced from method bmo.b
[WARN] : dalvikvm: VFY: unable to resolve direct method 1245: Landroid/app/AlertDialog$Builder;.<init> (Landroid/content/Context;I)V
[WARN] : TiDrawableReference: (main) [5540,9806] Could not open stream to get bitmap
[WARN] : TiDrawableReference: (main) [1,9807] Could not open stream to get bitmap
[WARN] : AnnotationProxy: (main) [1,9808] Unable to get the image from the path:
[ERROR] : E/ : Creating OpenGL 1.1 Session
[INFO] : dalvikvm: Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
[WARN] : dalvikvm: Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
[WARN] : dalvikvm: VFY: unable to resolve static field 4203 (CREATOR) in Lcom/google/android/gms/location/internal/ParcelableGeofence;
[WARN] : dalvikvm: VFY: unable to resolve static field 1633 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[WARN] : KeyCharacterMap: No keyboard for id 65538
[WARN] : KeyCharacterMap: Using default keymap: /system/usr/keychars/qwerty.kcm.bin
I am trying to get a NativeActivity app to implement GooglePlayServices. I'm currently trying to do this by creating my own class that extends NativeActivity.
My Google Play services Revision is 18 shown in my Android SDK Manager. I am running on a device that is running Android API 10.
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10"/>
Here is a snippet from my activity
public class KablamActivity extends NativeActivity {
#Override
protected void onResume(){
super.onResume();
GooglePlayServicesUtil.isGooglePlayServicesAvailable(this.getApplicationContext());
}
}
The following output is saying my Google Play services is out of date as well, but there is supposed to be a dialog popping up telling me something. What do I need to do to resolve the android.app.AlertDialog and android.app.Activity.getFragmentManager issues?
dalvikvm Could not find method android.app.AlertDialog$Builder.<init>, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.a
dalvikvm VFY: unable to resolve direct method 79: Landroid/app/AlertDialog$Builder;.<init> (Landroid/content/Context;I)V
dalvikvm VFY: replacing opcode 0x70 at 0x002c
dalvikvm Could not find method android.app.Activity.getFragmentManager, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.b
dalvikvm VFY: unable to resolve virtual method 28: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
dalvikvm VFY: replacing opcode 0x6e at 0x0023
dalvikvm VFY: dead code 0x0026-0030 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (ILandroid/app/Activity;Landroid/support/v4/app/Fragment;ILandroid/content/DialogInterface$OnCancelListener;)Z
dalvikvm DexOpt: couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
dalvikvm VFY: unable to resolve instance field 53
dalvikvm VFY: replacing opcode 0x52 at 0x0012
dalvikvm VFY: dead code 0x0014-0018 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
GooglePlayServicesUtil Google Play services out of date. Requires 5077000 but found 4452034
I am testing the sample google code on an actual device having 2.3.6.I thought it might be the problem with the key ,so I created different key on a different account through Google's API Console.Still the same problem "Google Maps Android API-Authorization Failure".
Here is the log:
12-07 10:31:30.476: D/dalvikvm(17791): DexOpt: couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
12-07 10:31:30.484: W/dalvikvm(17791): VFY: unable to resolve instance field 24
12-07 10:31:30.484: D/dalvikvm(17791): VFY: replacing opcode 0x52 at 0x0012
12-07 10:31:30.484: D/dalvikvm(17791): VFY: dead code 0x0014-0018 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.b (Landroid/content/res/Resources;)Z
12-07 10:31:30.718: D/dalvikvm(17791): GC_CONCURRENT freed 197K, 46% free 3063K/5639K, external 408K/517K, paused 3ms+4ms
12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/a/du; (411)
12-07 10:31:30.789: W/dalvikvm(17791): Link of class 'Lmaps/a/du;' failed
12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/a/ej; (2363)
12-07 10:31:30.789: W/dalvikvm(17791): Link of class 'Lmaps/a/ej;' failed
12-07 10:31:30.789: W/dalvikvm(17791): Unable to resolve superclass of Lmaps/j/k; (2379)
12-07 10:31:30.789: W/dalvikvm(17791): Link of class 'Lmaps/j/k;' failed
12-07 10:31:30.789: E/dalvikvm(17791): Could not find class 'maps.j.k', referenced from method maps.y.ae.a
12-07 10:31:30.789: W/dalvikvm(17791): VFY: unable to resolve new-instance 3571 (Lmaps/j/k;) in Lmaps/y/ae;
12-07 10:31:30.789: D/dalvikvm(17791): VFY: replacing opcode 0x22 at 0x007d
12-07 10:31:30.820: D/dalvikvm(17791): VFY: dead code 0x007f-008f in Lmaps/y/ae;.a (Landroid/view/LayoutInflater;Lcom/google/android/gms/maps/GoogleMapOptions;Z)Lmaps/y/ae;
12-07 10:31:31.281: D/dalvikvm(17791): GC_CONCURRENT freed 297K, 46% free 3222K/5959K, external 408K/517K, paused 3ms+4ms
12-07 10:31:31.523: D/dalvikvm(17791): GC_EXTERNAL_ALLOC freed 227K, 45% free 3397K/6087K, external 431K/517K, paused 52ms
12-07 10:31:31.648: I/System.out(17791): 0
12-07 10:31:31.734: D/dalvikvm(17791): GC_CONCURRENT freed 188K, 43% free 3531K/6151K, external 544K/1029K, paused 5ms+4ms
12-07 10:31:32.125: D/libEGL(17791): loaded /system/lib/egl/libGLES_hgl.so
12-07 10:31:32.132: D/BRCM_EGL(17791): eglCreateContext() context: 0xd7090, VC context 1, Thread 17810
12-07 10:31:32.148: D/BRCM_EGL(17791): eglCreateWindowSurface() surface: 0xd70d0, VC surface: 1, Thread: 17810
12-07 10:31:32.148: D/BRCM_EGL(17791): eglMakeCurrent(0xd7090, 0xd70d0, 0xd70d0) Thread: 17810
12-07 10:31:32.859: E/Google Maps Android API(17791): Authorization failure.
Here's is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smartapps4u.googlemapslib"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<permission
android:name="com.smartapps4u.googlemapslib.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.smartapps4u.googlemapslib.permission.MAPS_RECEIVE"/>
<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.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-library android:name="com.google.android.maps" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="My API key"/>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Any help would be appreciated.
Solved it.Very stupid mistake on my part.Used wrong api key.Was using the api key for the signed app.Replaced it with api key for debug keystore and solved the problem.
Had the same problem and #Sunkenglory 's answer is right, just to add some info for newbies like myself when I was looking for a solution.
On mac osX, my debug keystore was located here:
~/.android/debug.keystore
Go to that folder and run the following
keytool -list -v -keystore debug.keystore
That gave me the correct sha1 that I entered in the google console, and now it works.