android-studio

Error: Unexpected CPU variant for X86 using defaults: x86

寵の児 提交于 2020-04-29 08:00:38
问题 While trying to create a simple math game in android studio 2.3.1 after trying to execute my project, the app closes in emulator and gives warnings; 5-17 06:52:14.573 3088-3088/com.example.hp.game W/art: Unexpected CPU variant for X86 using defaults: x86 05-17 06:52:14.744 3088-3088/com.example.hp.game W/System: ClassLoader referenced unknown path: /data/app/com.example.hp.game-1/lib/x86 05-17 06:52:14.877 3088-3104/com.example.hp.game W/OpenGLRenderer: Failed to choose config with EGL_SWAP

Android studio- adding signing configurations to gradle

蓝咒 提交于 2020-04-28 09:44:26
问题 I am very new to the android world and I was trying to just get to run a simple hello world app on my phone. when I tried this I learnt that the APK generated by an android studio is an unsigned one. So to sign this I have gone through the process of creating a Key store and then a private Key, its alias and I was successful in signing the APK and installing on my phone and running it too. Then I went through this link for adding signing configurations to the gradle to automatically sign the

Android having problems while uploading Images using Retrofit multipart?

久未见 提交于 2020-04-21 06:36:27
问题 I'm getting the following error while trying to upload an Image to a server using retrofit, the api receives a header authorization token, _method = "put" and image = "imageName.jpg" as parameters, everything else is optional, any help would be appreciated. java.io.FileNotFoundException: /storage/emulated/0/Download/space-wallpaper-21.jpg: open failed: EACCES (Permission denied) userImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { galleryIntent =

Android having problems while uploading Images using Retrofit multipart?

拈花ヽ惹草 提交于 2020-04-21 06:34:19
问题 I'm getting the following error while trying to upload an Image to a server using retrofit, the api receives a header authorization token, _method = "put" and image = "imageName.jpg" as parameters, everything else is optional, any help would be appreciated. java.io.FileNotFoundException: /storage/emulated/0/Download/space-wallpaper-21.jpg: open failed: EACCES (Permission denied) userImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { galleryIntent =

Starting Flutter With Android Studio problems

自作多情 提交于 2020-04-18 06:12:29
问题 I want to run my hello world app on a device but when I run this app I catch errors in syncing . I don't know how to fix it. I had done every work for starting app like downloading SDKs or PATH in System variables but it doesn't work at last step my flutter SDK is last version of it. This is my flutter-tools/flutter.gradle file (default) . . . . buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.5.0' } } android { compileOptions {

Android Studio - VideoView only plays videos witth https and not http

你离开我真会死。 提交于 2020-04-18 06:10:27
问题 I have been working on an android app for live streaming and I used videoview as a player , but it only streams videos with https and throws a message "Can't play this video" if the link starts with http , that only happens on my real device not the emulator , how can I open access for http ? or how can I solve that problem actually. 回答1: here is the solution actually d this I have added this code to my Manifest and it worked all well ! android:usesCleartextTraffic="true" solution taken from

ImageView with rounded corners in Kotlin

旧街凉风 提交于 2020-04-18 05:36:07
问题 I want to have an ImageView with rounded corners in my Fragment. I've got the following Kotlin code: val imageView: ImageView = root.findViewById(R.id.profile_view) val pv = RoundedBitmapDrawableFactory.create(res, src) pv.setCornerRadius = 0f imageView.setImageDrawable(pv) create and res are red underlined by Android Stuido. create says: None of the following functions can be called with the following arguments supplied: - Bitmap? - InputStream - String res says: Expression expected, but a

Waiting for build to finish in android studio 3.5

跟風遠走 提交于 2020-04-18 04:42:09
问题 I have been working on a project since a long time in android studio and it does not show any problems but since i have updated my windows the app preview is constantly showing "waiting for build to finsh". I dont understand why, i have tried some approaches i have searched in google and stackoverflow but nothing helped me so far! I tried -sync project with gradle files -invalidate cache and restart -rebuilding several times Any reply will be appreciated. Thankyou! 回答1: Follow this steps:

What can i do with Android Studio Virtual Device slow when running and freezing computer when closing?

拟墨画扇 提交于 2020-04-18 03:56:13
问题 When I run the Android Studio AVD that comes with the IDE, the device is a bit slow and when closing the device (with the close icon) the mouse stops moving and the screen starts to flicker (by blinking I mean the Adnroid Studio IDE dissappearing at random intervals), then stops like after two minutes and then the virtual device shuts down. I have proved with three devices at api 25: Nexus 5 -Nexus 5x -Nexus 4 With Nexus 4 the app is faster, but is the same problem when closing it, it freezes

How to trigger a launch Activity intent when my app is closed on Android 10/Q?

时间秒杀一切 提交于 2020-04-18 03:47:32
问题 I am trying to create an app that will open another app at a specified time. To do this, I used an AlarmManager that starts a service. It works just fine if my app is open when the alarm is triggered. I get a notification that the service started, and the other app opens. However, if my app is in the background (after pressing the home button), and the alarm triggers, I get a notification that the service started, but the other app does not launch. What am I doing wrong? I am testing this on