Questions tagged [android-studio]

Use for questions about using Android Studio, an official IDE targeted at Android development. Do NOT use for questions about programming for Android in general; instead use [tag:android].

0
votes
0answers
6 views

Show activity on lock screen from foreground service notification

I have a foreground service running and when locked I want to double tap it to open an activity while still locked, or the very least a layout that I can add onclick listeners to. I've tried creating ...
1
vote
1answer
21 views

Android Studio: can't see layout preview

I can't see the layout preview in Android Studio 3.1.3.
1
vote
0answers
17 views

Change Kotlin .class output directory

Currently, Kotlin is compiling .class files into a different output directory than Java: Java: <module>/build/intermediates/classes/<flavor>/<buildType> Kotlin: <module>/...
0
votes
0answers
5 views

How can I get static firebase value

I want to take a value on Firebase DB. I have a score and I want to check previos value on DB and I will compare these values and set value higher one to DB. Here is my code as follow but I cant take ...
0
votes
0answers
9 views

Getting Error when I called the menu view

Hi there I'd like to get the menu view but I get this error : "Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference" Any help please ! ...
0
votes
0answers
13 views

Play Store is disabled on a pre-installed GS android emulator

I created a new virtual device from AVD manager and I selected the one with a pre-installed Play Store. But when I opened it, there was no store there.? I opened the details window of the virtual ...
0
votes
0answers
7 views

Fresco doesn't change the image

I have a fragment and a ImageView in it.I want to change the Image by fresco but the code doesn't change anything.This is my code: The code that i use in my fragment View view = inflater.inflate(...
0
votes
0answers
12 views

Multiline View containing TextViews and Buttons

Can anyone give me clues on where to start looking: I want to have a multiline View that will take repeated TextViews and Buttons on each line. When the line width is close to full (ie not enough ...
1
vote
1answer
27 views

Why is still Android Studio using Hello World TextView?

Everytime I create a new project in Android Studio, by default I get in my MainActivity, a TextView containing "Hello World", which every single time I need to remove it. Why that? Is there any option ...
0
votes
1answer
21 views

Cannot resolve 'R' due to conflict in version

In my gradle, I have a conflict in versions that gives me the error Cannot resolve symbol 'R' but I don't know what is the wrong version. In my gradle, I have a conflict in versions that gives me the ...
0
votes
1answer
12 views

Why am I getting this Android Studio error: “recompile with -fPIC”?

I am using NDK 18 and compiling a static library separately using the x86_64 NDK standalone toolchain. I can link it successfully but when I try to access the library in a non-trivial way I am getting ...
-4
votes
0answers
28 views

Want to make a view like this pic

I want to make a view like this in android : Any help will be appreciated. Thanks.
0
votes
0answers
13 views

Can you Remote Debug with a Amazon Phone? (LG X-Charge)

I want to debug my website on mobile Chrome. I turned on Dev mode and USB debugging on my phone. My machines has RSA key fingerprint and authorization to connect to my phone but cannot still see my ...
0
votes
0answers
19 views

background service with view

i have a background service that collecte some rss data news and i need to show just a small view or small activity defiling rss content (no overlay other app)that defile the news as long as the ...
1
vote
0answers
13 views

NULLABLE and NOTNULL cannot be resolved

Cannot resolve nullable and notNull! Please help anyone I am actually buliding a expanded search bar in which suggestions appear from json file on DROPBOX. I need this class for this purpose but I am ...
1
vote
3answers
21 views

cannot implement in AppCompatActivity

This is my code and what I've tried so far : import android.support.v7.app.AppCompatActivity import android.os.Bundle public class MainActivity : AppCompatActivity () { override fun onCreate(...
-4
votes
1answer
26 views

Call Button For Android Studio [on hold]

I need to make an app for a school project in android that has call buttons for things like police and ambulance. So there will be a button when you press it it automatically calls the number without ...
0
votes
0answers
20 views

Error on Android Studio code in class doesn't appear

I am currently developping an android app with Android Studio and until now everything was fine. However, when I opened my project this morning I find out that my code, written in Java, was gone ...
0
votes
0answers
13 views

WARNING: VM heap size set below hardware specified minimum

When I try to run my app it first give error: Configuration is still incorrect. Do you want to continue? When I click continue it gives this error: emulator: WARNING: VM heap size set below ...
1
vote
0answers
7 views

How to detect a click on the checkbox within a ListView when the its focusable is set to false

I am working on an application where I need to create a list. The list contains 2 textViews and 1 checkbox. The list has to delete the row which detects a click on it. But the click will only be ...
0
votes
0answers
2 views

More than one file was found with OS independent path 'maven.properties'

I am trying to implement group of com.microsoft.azure.cognitiveservices into my project. I used annotationProcessor to escape this error: Annotation processors must be explicitly declared now. The ...
0
votes
0answers
7 views

How To share Image,Titile,desc, On Share Intent

Using Sharing Intent How can We Share Image In Png or Jpeg Format Not In Link. Share Intent How to Share Image In Social Media Using Share Intent Here Is My Code public class DetailActivity ...
-2
votes
1answer
16 views

How to set the layout width and height in include tag in Android Studio

This is my .xml code <include layout="@layout/edit_password" android:id="@+id/passwordLayout" android:layout_height="100dp" android:layout_width="250dp" ...
0
votes
0answers
10 views

Android repository URL cannot be found

In my android studio there is a little red exclamation sign next to the Android Repository URL which says Cannot download https://dl.google.com/android/repository/repository2-1.xml Connection ...
-2
votes
1answer
19 views

Cannot resolve android:. Everything with android: in beginning is showing an error

Everything that is starting with android: is being shown in red. And says cannot resolve, for example take this style.xml file <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&...
0
votes
0answers
8 views

How do I create a circle using hdodenhof:circleimageview (Android studio)

I have used the library ´implementation 'de.hdodenhof:circleimageview:2.2.0'to Crete a circle out of animage View, replacing theimageViewxml` code with this: <de.hdodenhof.circleimageview....
1
vote
0answers
5 views

Android Studio AVD emulator

I have a problem with my emulator guys, if anyone knows how to fix this I would appreciate a lot. It is not displaying on scale, the interface appears on the left top corner on the emulated device and ...
1
vote
1answer
19 views

Installing ALL android studio offline

I have a PC which is not connected to Internet. I want to download every thing related to android studio (SDK, plugins support) any thing that I might need including different version of (API, SDK, ...
0
votes
0answers
12 views

How do I save a cropped image to the image gallery in android studio?

This is my function, please tell me what to add to save the cropped image to the image gallery: private void CropImage() { try{ CropIntent = new Intent("com.android.camera.action.CROP"); ...
0
votes
2answers
26 views

How do I use multiple lines in Kotlins when switch?

Kotlin uses when instead of switch and it looks something like this: when(version) { "v1" -> Log.d("TAG", "WOW") "v2" -> Log.d("TAG", WOAAH") else -> "Log....
-3
votes
1answer
19 views

Generating signed Bundle requires you to update the Android Gradle plugin to version 3.2.0 or higher

Error "Generating signed Bundle requires you to update the Android Gradle plugin to version 3.2.0 or higher." occurs when I create signed apk. Please check the above image.
0
votes
0answers
29 views

This issue comes when i upgrade android studio from 3.1.4 to 3.2.0

It’s I have delete build folder and also deleted ids.xml but the issue is not resolving. I have implemented ffmeg. Android resource compilation failed Output: C:\Users\hp\Desktop\New folder\...
0
votes
0answers
22 views

Couldn't extract text from the image chosen from gallery

Below is my code I can perfectly extract the text with the captured image but i am unable to do that with a chosen image from the mobile gallery. Like if I click a picture through this application I ...
0
votes
0answers
23 views

Error during Sync: Broken pipe - after update Android Studio 3.2

After update Android Studio to 3.2 and solve problem with sync gradle Gradle sync failed - after update Android Studio to 3.2 - i cant install apk - Event Log: Error during Sync: Broken pipe ...
0
votes
0answers
14 views

Energy consumption on Android Studio Profiler

In Android Studio 3.2 there is a Profiler that let you know what is the energy consumption of your application. We suspect a slow energy leak due to our application that reduces the battery autonomy ...
0
votes
1answer
21 views

I want to delete a file from amazon s3 bucket using android studio

I am trying to delete a file from s3 bucket using android studio. I have followed the tutorial below to set up my bucket. https://grokonez.com/android/uploaddownload-files-images-amazon-s3-android. ...
1
vote
2answers
13 views

Built apk extension type shows MobogenieAPK ? i dont know why

I built apk in Android studio but its extension shows as Mobogenie apk instead of normal apk.
1
vote
3answers
30 views

How do you get local time and do not update it when time changes?

I have to get the Localtime of UTC+5:45. I found the code and implemented it but the time gets updated when the as time progresses. How to get it fixed without updating? This is the code that I have ...
0
votes
0answers
9 views

Unable to build APK due to Program type already present: org.apache.http.ConnectionClosedException

I am unable to build an APK for my app as it is giving the following error - Program type already present: org.apache.http.ConnectionClosedException Someone else had asked the same question. ...
0
votes
0answers
9 views

To use keytool, should I add the embedded jdk from android studio to the PATH or should I install jdk globally?

I am running MacOS and installed Android Studio. Android development goes well until I need to run keytool command. $ keytool No Java runtime present, requesting install. $ which keytool /usr/bin/...
0
votes
0answers
10 views

JavaScript function as string in android webview.loadurl(some_javascript_func) not working

I have tried a lot of ways but unable to call function of JavaScript as string in WebView.loadurl() I have tried with using my own html file and it works perfectly but now i want to call JS function ...
0
votes
0answers
13 views

Gradle missingDimensionStrategy with support for debug/release builds

I have a library project with 2 flavors defined "flavor1" "flavor2" In my app gradle file I'm using missingDimensionStrategy for resolving the flavor defaultConfig { missingDimensionStrategy '...
0
votes
1answer
19 views

android studio not including Kotlin JUnit tests written along with Java jUnit test

I had a few JUnit tests written in Java. I have added new JUnit test classes which I have written in Kotlin. These classes are under the same folder where previously written JUnit Tests are located. i....
0
votes
2answers
35 views

Everything starting with android: has some error or warning in xml files

My project is building properly , but i am not able to see preview of UI and all the attributes starting with android: are either in red and says cannot resolve symbol. And also there is an error that ...
0
votes
0answers
22 views

Mutitouch between 3 buttons, the second touch is not detected

I have three classes to manage the mutitouch structured like this: MainActivity public class MainActivity extends AppCompatActivity { ConstraintLayout default_layout; Touch_Manager touch_manager; ...
-1
votes
3answers
37 views

How to set setOnClickListener to TextView that has been added programmatically?

I've spent for almost 2 days to solve this problem. I've also searched others similar problem but still can't find a way to solve this. Really grateful for the help. @Override public void ...
1
vote
0answers
26 views

Android Studio: is there a shortcut to extract Kotlin standard functions?

Say i want to use .apply{}: //Without using apply user.name user.address user.age //With apply user.apply { name address age } like extract variable (ctrl-alt-v) searches the current ...
0
votes
0answers
14 views

How to connect raspberry pi to android studio

I was trying to connect my raspberry pi 3 b+ to android studio, NOT Android Things. I know that Android Things is more easier but I am currently doing my project so I want to design an interface in ...
0
votes
0answers
48 views

Getting error after updating android studio to 3.2

We are facing an error of default activity is not found after update android studio to version "3.2". On another PC, which is running lower version 3.1.4 of android studio, this same application is ...
0
votes
0answers
19 views

tns run android - Emulator start failed with: Cannot run your app in the native emulator

I've scoured SO and Google and none of the suggestions have seemed to solve my issue. I previously had Android Studio on this Mac. I decided to finally add nativescript and followed the docs 100%. I ...