android-9.0-pie

Android Pie - 9 (API 28) : Installing APK … not successfully installing

守給你的承諾、 提交于 2019-11-27 19:32:12
问题 Recently I have updated OS to Android 9(Pie) and found that Whenever I try to install APK from android studio it does not work. As it just shows "Installing Apk..." and freezes at that point, After waiting too long it shows "Application Installation Failed" with "Installation failed with message null." Did anyone else is facing this issue? If yes then help, please. Here is the attached screenshot. Device and Enviornment Details : Device : MI A1 Android Studio : 3.2.1 Any Help, Idea,

Can not find Canvas variables in API Level 28

一笑奈何 提交于 2019-11-27 15:37:57
The following Canvas Variables are not found in Android 28. canvas.saveLayer(0, 0, getWidth(), getHeight(), null, Canvas.MATRIX_SAVE_FLAG | Canvas.CLIP_SAVE_FLAG | Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.FULL_COLOR_LAYER_SAVE_FLAG | Canvas.CLIP_TO_LAYER_SAVE_FLAG); Those flags have been removed in API 28. See here : Class android.graphics.Canvas Removed Methods int save(int) Removed Fields int CLIP_SAVE_FLAG int CLIP_TO_LAYER_SAVE_FLAG int FULL_COLOR_LAYER_SAVE_FLAG int HAS_ALPHA_LAYER_SAVE_FLAG int MATRIX_SAVE_FLAG That method was deprecated in API 26. See here : This method was deprecated

Volley Not making request on latest version of Android

穿精又带淫゛_ 提交于 2019-11-27 06:25:59
问题 I noticed my app wasn't working on Pixel 3. I went into android studio and emulated a few devices and noticed it is not working on any Android Pie (API 28) devices, but works fine on any other. I put a few logs throughout my code, and it seemed that I was not getting a response within my Volley usage. The app itself loads, but does not display any data, and I receive an error E/RecyclerView: No adapter attached; skipping layout My code is import android.content.Intent; import android.os

Can not build the project after upgrading to android - P

只谈情不闲聊 提交于 2019-11-27 03:23:51
问题 Below are the errors which I am getting C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\values-v28\values-v28.xml Error:(9, 5) error: resource android:attr/dialogCornerRadius not found. C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\values\values.xml Error:(252, 5) error: resource android:attr/fontVariationSettings not found. Error:(252, 5) error:

Getting the caller ID in Android 9

不想你离开。 提交于 2019-11-27 02:21:40
问题 I have been using the following code in a BroadcastReceiver to get the caller ID of incoming calls: @Override public void onReceive(Context aContext, Intent aIntent) { String action = aIntent.getAction(); if (action==null) return; if (!action.equals("android.intent.action.PHONE_STATE")) return; String curState = aIntent.getStringExtra(TelephonyManager.EXTRA_STATE); if ((TelephonyManager.EXTRA_STATE_RINGING.equals(curState)) &&(TelephonyManager.EXTRA_STATE_IDLE.equals(oldState)))){ String

Download Manger not working in Android Pie 9.0 (Xiaomi mi A2)

最后都变了- 提交于 2019-11-27 02:03:15
On updating the device OS to Android 9.0 , previously this code was working fine( Xiaomi mi A2 ). Now, files are not being downloaded on Android Pie 9.0 . Moreover it is working fine in Oreo, Nougat , Marshmallow Here is the code snippet: File myDir = new File(Environment.getExternalStorageDirectory(), "MyApp"); if (!myDir.exists()) { myDir.mkdirs(); } String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date()); DownloadManager mgr = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); Uri downloadUri = Uri.parse(url); DownloadManager

Fragments deprecated in Android P

…衆ロ難τιáo~ 提交于 2019-11-27 01:27:49
问题 I was looking at the documentation and found this This class was deprecated in API level P. Why are fragments deprecated in android P? 回答1: The rewrite in Support Library 27.1.0 Ian's medium post (Feb 28, 2018) gives us an explanation about it. He is Android Framework Developer at Google. Loaders in Support Library 27.1.0 For Support Library 27.1.0, I rewrote the internals of LoaderManager, the class powering the Loaders API and I wanted to explain the reasoning behind the changes and what to

java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion

六眼飞鱼酱① 提交于 2019-11-26 23:23:23
I 've met such error when I use Android studio 3.1 to build an Android P 's app, the apk can be made ,but when I use it on Android P emulator , it will crash and throw below info, more details see the pic. java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion part of my build.gradle under App module is below , anybody meet this ?And give some suggesstion ? Many thanks. android { compileSdkVersion 'android-P' buildToolsVersion '28-rc1' useLibrary 'org.apache.http.legacy' //for Lambda compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility

Can not find Canvas variables in API Level 28

一笑奈何 提交于 2019-11-26 17:12:42
问题 The following Canvas Variables are not found in Android 28. canvas.saveLayer(0, 0, getWidth(), getHeight(), null, Canvas.MATRIX_SAVE_FLAG | Canvas.CLIP_SAVE_FLAG | Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.FULL_COLOR_LAYER_SAVE_FLAG | Canvas.CLIP_TO_LAYER_SAVE_FLAG); 回答1: Those flags have been removed in API 28. See here: Class android.graphics.Canvas Removed Methods int save(int) Removed Fields int CLIP_SAVE_FLAG int CLIP_TO_LAYER_SAVE_FLAG int FULL_COLOR_LAYER_SAVE_FLAG int HAS_ALPHA_LAYER

Android design support library for API 28 (P) not working

空扰寡人 提交于 2019-11-26 14:26:12
I've configured android-P SDK environment successfully. When I attempt to use the android design support library I face project build errors. Project configurations are: IDE: 3.2 Canary 17 Target API: 28 Compile API: 28 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 28 defaultConfig { applicationId "com.app.navigationpoc" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled