android-studio

Android studio: NoClassDefFoundError with java.util.Base64

倖福魔咒の 提交于 2020-05-10 14:46:27
问题 Apologies, I've scanned the many similar-sounding questions and none of them have helped me. I'm running Android Studio 3.0.1, I'm a newbie, I'm following the online tutorial "HelloWorld" program but then adding a call to java.util.Base64.getDecoder(). This fails at runtime when I run it on my actual phone (Samsung Galaxy S8): java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/Base64; Caused by: java.lang.ClassNotFoundException: Didn't find class "java.util.Base64" on path:

Static interface methods are only supported starting with Android N (--min-api 24)

依然范特西╮ 提交于 2020-05-10 07:39:43
问题 I do nothing, just create new project then find this error. pls help me 回答1: This is a common issue and you just need to add android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } ... } There is explanation and direction in this link 回答2: build.gradle App module android{ compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } More Details 来源: https://stackoverflow.com

LG G4 not recognised by Android Studio

喜欢而已 提交于 2020-05-09 19:26:10
问题 I just got the LG G4 phone, turned on developer options mode, tried running an app from Android Studio but it can't recognise my phone. I even tried switching from MTP to PTP but still it's not recognised. I tried a lot of resources out there, still nothing. Please can anyone help? 回答1: So i restarted my device, and switched USB options from MTP to PTP. and for some reason it worked. I dont know why. Thanks for answers above, much appreciated 回答2: Had the same problem and tried everything

Error with SDK package download in Android Studio

淺唱寂寞╮ 提交于 2020-05-09 19:11:27
问题 java.io.IOException: Cannot download , response: 200 OK Warning: An error occurred while preparing SDK package Android Support Repository: Cannot download , response: 200 OK. java.io.IOException: Cannot download 'https://dl.google.com/android/repository/emulator-windows-3833124.zip': dl.google.com Warning: An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-windows-3833124.zip': dl.google.com. java.io.IOException:

How to edit /etc/hosts file in Android Studio emulator running in nougat?

别来无恙 提交于 2020-05-09 17:46:47
问题 Anyone know how to edit /etc/hosts file inside an android studio emulator running in nougat? I will be editing it so I can use my virtual host in my local web server. I tried editing it through terminal using adb however, it is returning Read-only file system. Tried also using chmod but still it fails. Update: I also tried pulling and pushing files using adb $ ./adb -s emulator-5554 push ~/Desktop/hosts /system/etc/hosts adb: error: failed to copy '/Users/Christian/Desktop/hosts' to '/system

Flutter 1.9: D/skia ( 5106): Shader compilation error

半城伤御伤魂 提交于 2020-05-08 09:12:31
问题 I've created a simple Flutter 1.9.1+hotfix.4 application using Android Studio 3.5.1. After adding successfully a new virtual device (Nexus 6) and tried to run my app, I got this error: Launching lib\main.dart on Android SDK built for x86 in debug mode... Initializing gradle... Resolving dependencies... Running Gradle task 'assembleDebug'... Built build\app\outputs\apk\debug\app-debug.apk. Syncing files to device Android SDK built for x86... D/skia ( 5106): Shader compilation error D/skia (

Google Maps user-editable polygon with fixed number of points in Android?

梦想与她 提交于 2020-05-07 09:24:57
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. BlackCoder wants to draw more attention to this question. I am working on Google Map polygon marker, I have predefined lat/long array, and need to set polygon area, It is working fine for me, but when I drag the marker polygon line doesn't change, it should have to be change as I drag the marker. Here is my problem, I'll put a picture to illustrate it easier. here is the code : myMap

React Native APK release

天涯浪子 提交于 2020-05-02 04:20:59
问题 I'm trying to build a Singed apk using android studio. I'm using react-native. As new to this field I actually can not find how to make it. I just run it from terminal and it just builds from there. What are the process for building a Signed apk using react-native. 回答1: The React Native Documentation for Generating a Signed APK is fairly comprehensive and should answer your question. Be careful when generating your keystore - if you lose this you won't be able to upload updates to Google Play

React Native APK release

南笙酒味 提交于 2020-05-02 04:19:08
问题 I'm trying to build a Singed apk using android studio. I'm using react-native. As new to this field I actually can not find how to make it. I just run it from terminal and it just builds from there. What are the process for building a Signed apk using react-native. 回答1: The React Native Documentation for Generating a Signed APK is fairly comprehensive and should answer your question. Be careful when generating your keystore - if you lose this you won't be able to upload updates to Google Play

Program type already present: androidx.arch.core.internal.SafeIterableMap$Entry [closed]

人走茶凉 提交于 2020-04-30 11:39:05
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 days ago . I've created a Unity app with firebase and Admob, then exported to android and generated aar file as a library, as I import that implement in native app it throws these erros: android { compileSdkVersion 28 defaultConfig { applicationId "android.unityembed" minSdkVersion 16 targetSdkVersion 28