javascript - App crashes while debugging, after installed Android 6.0.1 -


this might sound weird one. beginner coder , right making app has login/register activities. worked fine on samsung galaxy s3 (android version 4.3.), week ago installed cyanogenmod , have android version 6.0.1.

here problem - if run app opens popup alert "unfortunately, myfirstapp has stopped.", , when click ok button opens login window, should. after try enter credentials login or register shows default error message cannot connect server. tried on second phone, same model samsung galaxy s3, android 4.3 works without problem.

i tried debugging app crashes immediately, console message:

connected target vm, address: 'localhost:8613', transport: 'socket' disconnected target vm, address: 'localhost:8613', transport: 'socket' 

my appconfig:

// default configuration emulator/device urls // private static string base_url = "http://10.0.2.2/myfirstapp/"; private static string base_url = "http://192.168.0.103/myfirstapp/";  // server user login url public static string url_login = base_url + "login.php";  // server user register url public static string url_register = base_url + "register.php"; 

i have enabled debugging on phone.

event log:

12:03:55 executing tasks: [:app:incrementaldebugsupportdex] 12:03:56 gradle build finished in 1s 375ms 

console:

07/28 12:03:56: launching app no local changes, not deploying apk $ adb shell start -d -n "mcvc.kemo.myfirstapp/mcvc.kemo.myfirstapp.mainactivity" -a android.intent.action.main -c android.intent.category.launcher waiting application come online: mcvc.kemo.myfirstapp | mcvc.kemo.myfirstapp.test waiting application come online: mcvc.kemo.myfirstapp | mcvc.kemo.myfirstapp.test waiting application come online: mcvc.kemo.myfirstapp | mcvc.kemo.myfirstapp.test waiting application come online: mcvc.kemo.myfirstapp | mcvc.kemo.myfirstapp.test connecting mcvc.kemo.myfirstapp connected target vm, address: 'localhost:8609', transport: 'socket' // here click on ok button when popup says stopped working disconnected target vm, address: 'localhost:8609', transport: 'socket' 

manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mcvc.kemo.myfirstapp">  <permission     android:name="devncode.kemo.myfirstapp.permission.maps_receive"     android:protectionlevel="signature" />  <uses-permission android:name="devncode.kemo.myfirstapp.permission.maps_receive" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <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.read_contacts" /> <uses-permission android:name="android.permission.read_phone_state" />  <uses-permission android:name="android.permission.wake_lock" /> <uses-permission android:name="com.google.android.c2dm.permission.receive" />  <permission     android:name="com.example.gcm.permission.c2d_message"     android:protectionlevel="signature" /> <uses-permission android:name="com.example.gcm.permission.c2d_message" />  <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.access_coarse_location" />  <uses-feature     android:glesversion="0x00020000"     android:required="true" />  <application     android:name=".app.appcontroller"     android:allowbackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:supportsrtl="true"     android:theme="@style/apptheme">      <activity         android:name=".mainactivity"         android:label="@string/app_name"         android:screenorientation="portrait"         android:theme="@style/apptheme.noactionbar">         <intent-filter>             <action android:name="android.intent.action.main" />              <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>      <!--login/register activities-->     <activity         android:name=".loginregister.loginactivity"         android:theme="@style/apptheme.dark" />     <activity         android:name=".loginregister.registeractivity"         android:theme="@style/apptheme.dark" />     ... 

dependencies:

  compile 'com.android.support:appcompat-v7:23.1.1'    compile 'com.android.support:design:23.1.1'    compile 'com.google.android.gms:play-services:8.3.0'    compile 'com.jakewharton:butterknife:6.1.0'    compile 'de.hdodenhof:circleimageview:1.3.0'    compile 'com.mcxiaoke.volley:library-aar:1.0.0' 

most problem here new android permission model. since api 23 (android 6.0) have ask user permissions directly before using features need. should either target api 22 or below or implement run time permission. hundred percent sure causes problem should view logs (android monitor -> logcat, , don't forget clear tag text box, may choose "error" level see errors).


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -