android-studio

Android Studio 64 bit inline ARM assembly

自作多情 提交于 2021-01-29 20:00:54
问题 I am trying to run some inline assembly code for aarch64 from Android Studio 3.4.2 and I got a compilation error error: Don't know how to handle indirect register inputs yet for constraint 'r' . My code snippet as follows std::string system_file = "/system/bin/sh"; std::int64_t file_descriptor = -1; #ifdef __aarch64__ __asm__ volatile("mov x8, #180\n\t" "mov x0, %1\n\t" "mov x1, #0\n\t" "svc #1\n\t" "mov %0, x0\n\t" :"=r"(file_descriptor) :"r"(system_file) :"x0","x1","x8" ); #endif ARM64

How to solve this error of Android Studio?

亡梦爱人 提交于 2021-01-29 19:20:09
问题 A problem occurred configuring root project 'My Application'. Could not resolve all artifacts for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:3.6.2. Required by: project : No cached version of com.android.tools.build:gradle:3.6.2 available for offline mode. No cached version of com.android.tools.build:gradle:3.6.2 available for offline mode. This is my error and I don't know how to solve this please help me to solve this 回答1: In Android Studio select View >

Ubuntu: setting environment variables

≡放荡痞女 提交于 2021-01-29 18:30:40
问题 I need set environment variables for Android Studio project EVERY TIME when reboot or close terminal. (Ubuntu 14.04) For setting variables I use: export KEYSTORE_NAME=/home/anna/Documents/keys/NAME.keystore export KEYSTORE_NAME_PASSWORD=PASSWORD export KEY_NAME_ALIAS=NAME export KEY_NAME_PASSWORD=PASSWORD How can I set there variables forever? 回答1: Put those lines in /home/anna/.bashrc or in /home/anna/.bash_profile depending on which file you use. I think it is .bashrc in Ubuntu by default.

Error when downloading a file with url into internal storage Android Studio

戏子无情 提交于 2021-01-29 18:23:06
问题 I'm trying to download a mp3 music into internal storage, but conexion.connect(); seems like it have a error and end up going to the Exception. Here is my code: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { String filePath = getExternalCacheDir().getAbsolutePath(); filePath += "/audiotest.mp3"; int count; try { URL url = new URL("my_url_to_download"); URLConnection conexion = url.openConnection(); conexion.connect(); /

“Cause: duplicate entry: AndroidManifest.xml” with a project having two manifest files

匆匆过客 提交于 2021-01-29 17:49:12
问题 I get this error "Cause: duplicate entry: AndroidManifest.xml" every time I want to build my project. I have cleaned and rebuild the project and it still gives this error. my merged manifest has no errors. This the AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.dream.chat"> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses

MPAndroidChart x date value duplication problem

只愿长相守 提交于 2021-01-29 16:57:55
问题 I am implementing the function to display the change of exercise time by date as a graph. But there was a problem. Before I explain the problem, I will briefly explain my code. When a date is input from the user, the date is stored in the database and output by date. For example, when the user enters 2020/06/26, it is displayed as 06/26 on the graph. Now I will explain the problem. The x value of the graph is overlapping. 07/01 does not appear immediately after 06/30, but very far. I will

How to reduce firebase realtime database download cost? [closed]

瘦欲@ 提交于 2021-01-29 16:52:34
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 months ago . Improve this question Will making 2 database in firebase realtime database help to reduce cost and increase daily download limit of 360MB per day? 回答1: The simplest way to reduce the cost is by reducing the downloads . You can do that by caching the data on local storage as much

Gradle sync failed: Build file '…\build.gradle' should not contain a package statement

吃可爱长大的小学妹 提交于 2021-01-29 15:10:55
问题 My application was working perfectly fine, I dont know what happened all of a sudden the build.gradle throw an error stating Gradle sync failed, build file '...\build.gradle' should not contain a package statement, the thing is I checked my other apps as well and they had the same package com.example.myapplication; here is my build.gradle(project:FaceRec); package com.example.myapplication; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent;

Android Bluetooth Scanner startDiscovery() showing nothing at the output

流过昼夜 提交于 2021-01-29 13:56:04
问题 Problem I am trying to create a bluetooth scanner , using android bluetooth API startDiscovery() method. I'm trying to show device list using list view,but the output dont show anything. package com.example.shad.lucaa; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.v7

I have just installed android studio and emulator is not working 3.6.2

好久不见. 提交于 2021-01-29 13:36:24
问题 I have just completed a fresh install of android studio and I have created a virtual device I am trying to start android virtual device but I am getting this error. Emulator: C:\android_sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe' 回答1: I created an AVD with a lower API level that just worked for me 来源: https://stackoverflow.com/questions/61243837/i-have-just-installed-android-studio-and-emulator-is-not-working-3