Android emulator (v28.0.23) unable to make HTTP requests - android

I am running a NativeScript-Vue application (TNS Android v5.1.0) on Mojave v10.14.3 with Android Studio v3.3.1 and Android emulator v28.0.23.
The Android emulator I am using (Nexus 6, API 25, Android 7.1.1 (Google APIs), x86) loses ability to make HTTP requests. The request hangs for a couple of minutes and eventually times out. I am using axios as the HTTP client to consume a remote C#.NET API (this is a client's API so I do not have access to it directly).
I found this SO post and tried most of the solutions. Some of them seemed to work, but then after a few minutes, the problem reoccurs.
Solutions I have tried:
Wiped data from emulator via AVD manager
Cold booted emulator via AVD manager
Created a new emulator via AVD manager
Set emulator proxy status to "No proxy" instead of using Android Studio's default proxy settings
Ran adb kill-server
Added 8.8.8.8 and 8.8.4.4 as DNS servers for my Mac
Started emulator with a specified DNS server, e.g. $ANDROID_HOME/emulator/emulator -avd Nexus_6_API_25 -dns-server 8.8.8.8,8.8.4.4
Attempted on Genymotion emulator (same issue)
Set WiFi as first in the Network Service order
Rebooting system; works for a few minutes then issue reoccurs
Additional information:
I am using WiFi and have not recently switched from LAN.
Chrome doesn't have internet access either.
The application works as expected on the iOS simulator and on physical android devices.
I installed Mojave recently, however the issue existed previously, although not as frequently it seemed.
JDK-8 and Android-SDK were installed via Homebrew following the NativeScript docs here.
I am fairly new to mobile development, please let me know if any more information is needed.
Does anyone know how I can fix this issue? I have limited access to a physical device so getting this fixed would be a tremendous help. Thanks!
HTTP Request example:
// api/config.js
import axios from "axios";
export default axios.create({
baseURL: "https://testapi.org",
headers: {
"Content-Type": "application/json",
}
});
// store/modules/auth.js
import api from "api/config.js";
const actions = {
login: async function(context, payload) {
try {
const response = await api.post("/api/account/login", payload);
context.dispatch("setUser", response.data.user);
} catch (error) {
console.log(error);
}
}
};
export default {
namespace: true,
actions
};
Logcat output:
02-28 14:12:40.742 1722 1816 D ConnectivityService: NetworkAgentInfo [MOBILE (LTE) - 100] validation failed
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: Error sending ping
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: java.net.SocketTimeoutException: SSL handshake timed out
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms#13280022#13.2.80 (040700-211705629):8)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms#13280022#13.2.80 (040700-211705629):15)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectTls(Connection.java:235)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectSocket(Connection.java:199)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connect(Connection.java:172)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:329)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at bsc.a(SourceFile:230)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at bsf.run(SourceFile:174)
02-28 14:12:48.271 2939 3095 E GoogleConversionReporter: at java.lang.Thread.run(Thread.java:761)
02-28 14:12:49.375 2651 2932 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:49.376 2651 2932 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:49.376 2651 2932 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:49.376 2651 2932 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:49.376 2651 2932 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:49.376 2651 2932 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:50.171 2651 2930 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:50.171 2651 2930 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:50.171 2651 2930 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:50.172 2651 2930 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:50.172 2651 2930 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:50.172 2651 2930 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:50.283 2651 2929 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:50.284 2651 2929 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:50.284 2651 2929 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:50.284 2651 2929 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:50.284 2651 2929 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:50.284 2651 2929 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:12:51.482 2651 3200 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
02-28 14:12:51.482 2651 3200 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
02-28 14:12:51.482 2651 3200 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#13280022#13.2.80 (040700-211705629):13)
02-28 14:12:51.482 2651 3200 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
02-28 14:12:51.482 2651 3200 W Conscrypt: at libcore.io.Posix.setsockoptTimeval(Native Method)
02-28 14:12:51.482 2651 3200 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:157)
02-28 14:13:05.945 5154 5156 I art : Do partial code cache collection, code=30KB, data=30KB
02-28 14:13:05.946 5154 5156 I art : After code cache collection, code=30KB, data=30KB
02-28 14:13:05.946 5154 5156 I art : Increasing code cache capacity to 128KB
02-28 14:13:14.458 2363 5301 E WakeLock: GCM_HB_ALARM release without a matched acquire!

Related

Android release APK fails immediately on launch on mobile device

The Android release APK crashes on launch when I install it on mobile device. It works fine on Android Emulator. Also, debug builds work fine on Emulator.
I’ve tried the methods in the below link suggested by #bhardman, #gderaco + #sacchykhedkar and #alvelig so far with no success.
https://github.com/facebook/react-native/issues/18357
Environment:
package.json
…
"dependencies": {
"react": "^16.6.3",
"react-dom": "^16.8.1",
"react-native": "0.58.4",
"react-native-gesture-handler": "^1.0.15",
"react-native-image-pan-zoom": "^2.1.11",
"react-navigation": "^3.2.1"
},
…
android/ build.gradle
…
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
…
App.js
…
import React, {Component} from 'react';
import { Platform, StyleSheet, Text, View, Image, Dimensions, Button, TouchableHighlight, WebView, ViewPropTypes } from 'react-native';
import { createStackNavigator, createAppContainer, StackActions, NavigationActions, withNavigation } from "react-navigation";
type Props = {};
export class App1 extends Component {
render() {
return (
<View style={styles.container}>
<TopMenu1 navigation={this.props.navigation} />
<View1Map />
</View>
);
}
}
…
Expected behaviour:
You open the app on your mobile device. And the app opens.
Actual behaviour:
App fails to launch on Android phone. Error message:
Unfortunately, [APP Name] had stopped.
Error messages (from logs.txt file generated from the Android phone):
I can't tell which lines are relevant. So I searched with the app name "sampleapp".
02-14 08:12:51.252 1062 1940 I ActivityManager: Killing 26119:com.android.defcontainer/u0a17 (adj 15): empty #17
02-14 08:12:51.260 1062 2363 I ActivityManager: Recipient 26119
02-14 08:12:51.270 1062 1385 I ActivityManager: Recipient 26671
02-14 08:12:51.295 1062 1698 D StatusBarManagerService: swetImeWindowStatus vis=0 backDisposition=0
02-14 08:12:51.341 1062 1940 D PMS : releaseWL(23288de): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{10256}
02-14 08:12:51.410 1062 1385 I ActivityManager: Process com.htc.videocenter (pid 26671) has died
02-14 08:12:52.438 26718 26718 E AndroidRuntime: FATAL EXCEPTION: main
02-14 08:12:52.438 26718 26718 E AndroidRuntime: Process: com.sampleapp, PID: 26718
02-14 08:12:52.438 26718 26718 E AndroidRuntime: java.lang.IllegalStateException: Unable to create layer for ReactViewGroup
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.nativePollOnce(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.next(MessageQueue.java:323)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.Looper.loop(Looper.java:144)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5845)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
02-14 08:12:52.446 1062 2435 W ActivityManager: Force finishing activity com.sampleapp/.MainActivity
02-14 08:12:52.498 1062 2435 D PMS : acquireWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 1062 1000 WorkSource{10256}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: setSystemUiVisibility(0x8000)
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: disable:userId=0 what=0x0 which=0x1 pkg=Window{f67b705 u0 Application Error: com.sampleapp}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: hiding MENU key
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(967c58c): CPU_MIN_NUM ActivityManager-MultiCore-Num 0x8000 null
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(5a7f4d5): CPU_MIN_FREQ ActivityManager-MultiCore-Freq 0x2000 null
02-14 08:12:52.999 1062 1080 W ActivityManager: Activity pause timeout for ActivityRecord{858d360 u0 com.sampleapp/.MainActivity t2027 f}
02-14 08:12:53.108 1062 1072 D PMS : releaseWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{2897}

Android Emulator install debug react native app

I'm trying to set up previously working on Mac react native project on Linux and I ran into an issue.
I start the emulator
cd $ANDROID_HOME/tools && sudo ./emulator -avd nexus-5X-API-27
then I try to install the debug *.apk to it. In the [project_folder]/android/app/build/outputs/apk/debug
sudo adb install -r app-debug.apk
and I have the following errors in the adb logcat
04-21 10:25:49.672 +0000 1587 1662 D ConnectivityService: NetworkAgentInfo [WIFI () - 101] validation passed
04-21 10:25:49.677 +0000 1587 4035 I WifiService: getConnectionInfo uid=10013
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms#12529024#12.5.29 (040700-192802242):13)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method)
04-21 10:25:49.683 +0000 2031 2490 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:175)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : [AppCertManager] IOException while requesting key:
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : java.io.IOException: Invalid device key response.
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gga.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):12)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gga.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):64)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gfy.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):8)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gfu.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):1)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at gft.a(:com.google.android.gms#12529024#12.5.29 (040700-192802242):10)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms#12529024#12.5.29 (040700-192802242):7)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at fiw.call(:com.google.android.gms#12529024#12.5.29 (040700-192802242):3)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.FutureTask.run(FutureTask.java:266)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at nsg.run(:com.google.android.gms#12529024#12.5.29 (040700-192802242):27)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at nya.run(Unknown Source:7)
04-21 10:25:49.746 +0000 2031 2490 W GLSUser : at java.lang.Thread.run(Thread.java:764)
04-21 10:25:54.479 +0000 1587 1600 E memtrack: Couldn't load memtrack module
Any thoughts what could be the cause of that? I would appreciate any direction!
UPDATE
Actually, the
sudo adb install -r app-debug.apk
Installs the app, and everything works. Seems that adb logcat is not relevant here.
However, if I run
sudo react-native run-android
It executes successfully but on the emulator, I have the following error.
As far as I understand this error tells that the development server (I assume it's node) returns the error, which means that any changes to the code will not be dynamically picked up, which is what I'm trying to accomplish.
UPDATE
OK, I finally figure out what is wrong here.
When I first ran
sudo adb install -r app-debug.apk
The Running Metro Bundler was not started, meaning after system reboot I hadn't run the
sudo react-native run-android
Which starts the development server. Therefore the application was running OK.
Now what I did, I killed the server
sudo lsof -i :8081
kill -9 <PID>
And started the
sudo react-native start
In a separate terminal session. There I could see that I have some issues with the watchman lib when I start my app on the emulator, which I believe are the cause of my issue.
Hope it will be useful for somebody.

Mojo BudgetService

I start my Meteor App with "meteor run android". I get some Errors:
I20171121-07:41:24.201(1)? 11-21 01:41:00.483 4067 4172 E chromium: [ERROR:gl_surface_egl.cc(289)] eglChooseConfig failed with error EGL_SUCCESS
I20171121-07:41:24.207(1)? 11-21 01:41:00.917 4067 4127 E chromium: [ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_renderer from binding interface:
blink::mojom::BudgetService exposed by: content_browser
-
I20171121-07:41:24.208(1)? 11-21 01:41:01.255 4097 4131 E chromium: [ERROR:BudgetService.cpp(167)] Unable to connect to the Mojo BudgetService.
I20171121-07:41:57.587(1)? 11-21 01:41:40.944 4067 4067 I MeteorWebApp: Serving asset bundle with version: 5c0acfb7c964b67f3c1ec29335c3fb0e27b7d59d
I20171121-07:41:57.878(1)? 11-21 01:41:41.234 4067 4127 E chromium: [ERROR:service_manager.cc(156)] Connection InterfaceProviderSpec prevented service: content_renderer from binding interface:
blink::mojom::BudgetService exposed by: content_browser
Has anybody an idea how to solve these problems??

android.content.ActivityNotFoundException: No Activity found to handle Intent

I m a newbie to Android. I am trying to use google location API and when run in the emulator it shows Unfortunately your app stopped working.
I did a adb logcat and here is my stacktrace
10-31 23:43:02.010 2370 2370 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:02.011 2370 2370 D AndroidRuntime: CheckJNI is ON
10-31 23:43:02.026 2370 2370 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:02.030 2370 2370 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:02.044 2370 2370 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:02.044 2370 2370 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:02.045 2370 2370 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:02.062 2370 2370 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-31 23:43:02.073 2228 2240 I art : CollectorTransition marksweep + semispace GC freed 125(-7KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 379KB/891KB, paused 5.591ms total 5.591ms
10-31 23:43:02.080 2228 2242 D DefContainer: Copying /data/local/tmp/HighwayMechanic.apk to base.apk
10-31 23:43:02.181 1138 1177 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl931695514.tmp/base.apk pkg=com.highway.highwaymechanic isa=x86 vmSafeMode=false debuggable=true oatDir = /data/app/vmdl931695514.tmp/oat
10-31 23:43:02.190 2382 2382 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
10-31 23:43:02.190 2382 2382 W dex2oat : Mismatch between dex2oat instruction set features (ISA: X86 Feature string: smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2) and those of dex2oat executable (ISA: X86 Feature string: smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2) for the command line:
10-31 23:43:02.190 2382 2382 W dex2oat : /system/bin/dex2oat --zip-fd=6 --zip-location=base.apk --oat-fd=7 --oat-location=/data/app/vmdl931695514.tmp/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=8 --debuggable
10-31 23:43:02.190 2382 2382 I dex2oat : /system/bin/dex2oat --debuggable
10-31 23:43:08.200 2382 2382 I dex2oat : dex2oat took 6.009s (threads: 1) arena alloc=2MB java alloc=6MB native alloc=32MB free=2MB
10-31 23:43:08.276 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: uninstall pkg
10-31 23:43:08.294 1138 1177 I PackageManager: Package com.highway.highwaymechanic codePath changed from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1; Retaining data and using new
10-31 23:43:08.295 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: replace pkg
10-31 23:43:08.296 1138 1177 W PackageManager: Code path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.296 1138 1177 W PackageManager: Resource path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.333 1138 1177 W Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
10-31 23:43:08.333 1138 1177 I art : Starting a blocking GC Explicit
10-31 23:43:08.353 1138 1177 I art : Explicit concurrent mark sweep GC freed 10787(756KB) AllocSpace objects, 11(220KB) LOS objects, 19% free, 5MB/6MB, paused 517us total 13.651ms
10-31 23:43:08.357 1138 1177 W PackageManager: Couldn't remove dex file for package: at location /data/app/com.highway.highwaymechanic-2/base.apk, retcode=-1
10-31 23:43:08.359 1138 1177 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=0: pkg removed
10-31 23:43:08.360 2370 2370 I art : System.exit called, status: 0
10-31 23:43:08.360 2370 2370 I AndroidRuntime: VM exiting with result code 0.
10-31 23:43:08.400 1138 1138 D JobSchedulerService: Receieved: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.403 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.404 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.404 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.414 1925 1925 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1221 android.content.ContextWrapper.startService:581 android.content.ContextWrapper.startService:581 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2725
10-31 23:43:08.418 1138 1641 I BroadcastQueue: Delay finish: com.android.keychain/.KeyChainBroadcastReceiver
10-31 23:43:08.514 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.515 1138 2212 I BroadcastQueue: Resuming delayed broadcast
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REPLACED
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1566 1566 D CarrierConfigLoader: mHandler: 9 phoneId: 0
10-31 23:43:08.617 2390 2390 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:08.619 2390 2390 D AndroidRuntime: CheckJNI is ON
10-31 23:43:08.635 2390 2390 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.640 2390 2390 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:08.654 2390 2390 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:08.654 2390 2390 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:08.655 2390 2390 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:08.667 2390 2390 D AndroidRuntime: Calling main entry com.android.commands.am.Am
10-31 23:43:08.669 1138 2212 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.highway.highwaymechanic/.MainActivity} from uid 0 on display 0
10-31 23:43:08.691 2390 2390 D AndroidRuntime: Shutting down VM
10-31 23:43:08.695 2390 2395 I art : Debugger is no longer active
10-31 23:43:08.695 2390 2401 E art : Thread attaching while runtime is shutting down: Binder_2
10-31 23:43:08.695 2390 2401 I AndroidRuntime: NOTE: attach of thread 'Binder_2' failed
10-31 23:43:08.697 2402 2402 I art : Not late-enabling -Xcheck:jni (already on)
10-31 23:43:08.697 2402 2402 I art : Late-enabling JIT
10-31 23:43:08.702 2402 2402 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.708 1138 1712 I ActivityManager: Start proc 2402:com.highway.highwaymechanic/u0a53 for activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:08.717 2402 2409 E art : Failed sending reply to debugger: Broken pipe
10-31 23:43:08.717 2402 2409 I art : Debugger is no longer active
10-31 23:43:08.728 2402 2402 W System : ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.797 2402 2402 D gralloc_goldfish: Emulator without GPU emulation detected.
10-31 23:43:08.818 1138 1170 I ActivityManager: Displayed com.highway.highwaymechanic/.MainActivity: +129ms
10-31 23:43:10.932 1138 1429 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending} from uid 10053 on display 0
10-31 23:43:10.933 2402 2402 D AndroidRuntime: Shutting down VM
10-31 23:43:10.933 2402 2402 E AndroidRuntime: FATAL EXCEPTION: main
10-31 23:43:10.933 2402 2402 E AndroidRuntime: Process: com.highway.highwaymechanic, PID: 2402
10-31 23:43:10.933 2402 2402 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending }
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3917)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3877)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4200)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4168)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View.performClick(View.java:5198)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21147)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-31 23:43:10.934 1138 1712 W ActivityManager: Force finishing activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:10.935 943 943 D gralloc : Registering a buffer in the process that created it. This may cause memory ordering problems.
10-31 23:43:10.935 943 943 E libEGL : called unimplemented OpenGL ES API
10-31 23:43:10.935 943 943 E SurfaceFlinger: glCheckFramebufferStatusOES error 1711643839
10-31 23:43:10.935 943 943 E SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
10-31 23:43:11.448 1138 1162 W ActivityManager: Activity pause timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
10-31 23:43:21.478 1138 1162 W ActivityManager: Activity destroy timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
Here is my Android_manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.highway.highwaymechanic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="23" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".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>
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
</application>
</manifest>
Here is my MainActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends FragmentActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
Here is my MapsActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
#Override
public void onMapReady(GoogleMap map) {
LatLng sydney = new LatLng(-34, 151);
map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
When run in the emulator it crashes with Unfortunately the app stopped working.
Please help me with it.
Thanks in Advance
I believe this should have been fixed with the latest release of the Google Play services client library. Note that this is a fix in the client library and so you will have to update the library to the latest revision using your SDK manager and recompile your application.
for more details you can check this link
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4862
Do you have an another Activity named Map? As I see in your manifest,
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
Likewise, there should be a similar tag for the MapsActivity in your manifest. I think this is the error.
it bugs out much sooner, missing some native assembly for x86 architecture:
W System: ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
followed by:
W GooglePlayServicesUtil: Google Play services is missing.
To add the missing Google Play (incl. Maps) Services, wrote a how-to once (it's almost the same).
While that FragmentActivity requires an IntentFilter, else it cannot be launched, for example:
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_map">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>

Sqlite: cannot open file at line

This error happened occasionally when I did some user/stress test on Android. Files under /data disapppeared and system server crashed after this error occurred. I am curious about the name of database "contacts2.db-mj7742599A4". Normally it should be contacts2.db. What does "*.db-mj7742599A4" mean? Anyone can help please?
02-28 19:21:43.161 660 695 E SQLiteLog: (14) cannot open file at line 30174 of [00bb9c9ce4]
02-28 19:21:43.169 660 695 E SQLiteLog: (14) os_unix.c:30174: (2) open(/data/data/com.android.providers.contacts/databases/contacts2.db-mj7742599A4) -
02-28 19:21:43.520 397 409 I am_crash: [660,android.process.acore,572933,android.database.sqlite.SQLiteCantOpenDatabaseException,unable to open database file (code 14),SQLiteConnection.java,-2]
02-28 19:21:43.536 397 5671 I am_crash: [397,system_server,-1,java.lang.IllegalArgumentException,NULL,StatFs.java,-2]

Categories

Resources