Questions tagged [android-studio]

21436 questions
-1

votes
0

answer
7

Views

Cannot find default config in AndroidStudio 3.4

Since upgrading to 3.4, I can't seem to find a GUI way to edit the 'defaultConfig' info. Do I have to edit the Gradle file directly? I can edit my two 'Flavors' fine, but not the defaults. Thoughts?
Dave Hubbard
1

votes
2

answer
288

Views

Authenticator, incorrect translate Java to Kotlin

I'm trying to convert a lot of code Java into Kotlin. I found on stack how to set authentication with OkHttp: client.authenticator(new Authenticator() { @Override public Request authenticate(Route route, Response response) throws IOException { if (responseCount(response) >= 3) { return null; // I...
companyn
1

votes
1

answer
1.1k

Views

Could not find method buildTypes() for arguments on project ':app' of type org.gradle.api.Project

After i import an Eclipse projet to Android studio 3.0.1 Now this is the build.gradle for my projet apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId 'com.zombieshunter.gameoverstudios' minSdkVersion 14 targetSdkVersion...
0

votes
0

answer
16

Views

Resources$NotFoundException thrown after updating Gradle Plugin to 3.4.0

I have a project with multiple modules, and after updating to Gradle Plugin 3.4.0 and Gradle 5.1.1, everything else seems to work OK, but the module for Espresso tests crashes immediately when trying to run the tests: android.content.res.Resources$NotFoundException: Drawable com.example.foo:dimen/ac...
manabreak
0

votes
0

answer
15

Views

java lang NoClassDefFoundError on activity start in android 4.4

My application is giving me java lang noclassdeffounderror when i start a new activity. Its working fine with higher version of android api but when i use android api 19 or android kitkat 4.4 its not working. i have checked many answers but none of them is working android { compileSdkVersion 28 defa...
Arsl An
0

votes
0

answer
6

Views

onEditorActionListener is not working in kotlin

keyboard ime action Done is not working when applied in kotlin language companyCodeTv.setOnEditorActionListener { v, actionId, event -> if (actionId == EditorInfo.IME_ACTION_DONE || event?.action == KeyEvent.ACTION_DOWN && event.keyCode == KeyEvent.KEYCODE_ENTER){ validateFields() true } else false...
anu saini
0

votes
0

answer
3

Views

connect timed out in android studion 3.4

At the time of updating Android studio 3.4 get error : Cause: connect timed out Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.3.2. at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentReposit...
kulkarni swati
1

votes
1

answer
146

Views

Check shared Post on Facebook Successfully or discarded

Facebook SDK always call onSuccess(Sharer.Result result) after discarding the post. I am using the share post of the Facebook SDK, but always call onSuccess listener even after the discard or cancel the post. I am using this facebook SDK for share the post implementation 'com.facebook.android:facebo...
Amit Verma
1

votes
2

answer
218

Views

How can I resolve this Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3?

I am experiencing a problem with mapbox-android-navigation: Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3 | MAPBOX** dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android....
Danny Korbold
1

votes
1

answer
241

Views

Kotlin code stack trace shows Java line numbers

I'm trying to debug a couple of crashes for my app in the Google Play Store, but the stack traces showing in the Play Store show Java filenames and line numbers instead of direct references to my Kotlin code. I viewed the Java code in Android Studio, but the line numbers do not match. To view the Ja...
Crag
1

votes
2

answer
1.1k

Views

android studio makes corrupted Colors.xml, then unknown errors occur [duplicate]

This question already has an answer here: Android Studio shows wrong file contents 6 answers Recently I was working with my android studio with no problems, suddenly my project started giving random errors(about my resources) after I tried to add a new library to my project. I completely cleaned th...
ali3shah
1

votes
3

answer
3.8k

Views

update android Build Tools revision to 28.0.3

I updated the android stadio to version '3.2.1' and the android stadio asked me to update something like tools.build:gradle to 3.2.1 and i did, Now the gradle version is 4.6 and it says Failed to find Build Tools revision 28.0.3. i tried to install it but some error occur that informed 'the package...
amir ghorbani
1

votes
1

answer
1.3k

Views

Material design Spinner using TextInputLayout.OutlinedBox styling

I am currently using Material Design TextInputLayout OutlinedBox as shown below: I am trying to add a dropdown box Spinner under my TextInputEditText, and would like to keep the same styling: OutlinedBox. I see that dropdowns seem to be supported in Material Design, Material Design Text Fields. As...
PhilBlais
1

votes
3

answer
797

Views

Failed to finalize session : INSTALL_FAILED_INVALID_APK: /data/app/…tmp/…-debug version code 29 inconsistent with 28

This error happens when i try to run the app on the simulator: It asks if it can uninstall the current application but there is no application installed on the simulator. If i click ok, just fails. I try to invalidate cache and restart, to reboot the pc, to create a new simulator, to update Android...
ByteArtisan
1

votes
2

answer
26

Views

Is there any way to change default font from fontawesome website

I found some fonts from this site : Font Awesome Website i want to use these fonts to add icons to the text,button etc... , But my question can I change default font?
Taha Sami
1

votes
1

answer
184

Views

Action bar not visible in Android Studio

I used a custom toolbar in one of my activities by setting the theme of that activity to No Action Bar in the Android Manifest file. But now rest all the activities are showing no action bar in the Android Studio at the time of designing which is making the whole designing process cumbersome. Howe...
neer17
1

votes
3

answer
894

Views

Failed to resolve: com.google.firebase:firebase-firestore:16.0.1

I'm switching from realtime database to firestore and I keep getting the same error: Failed to resolve: com.google.firebase:firebase-firestore:16.0.1 I have looked at similar questions on this site but still haven't been able to fix this problem. Here is the code from my app gradle: apply plugin: 'c...
minikate
1

votes
1

answer
65

Views

How to remove tabs on multiple rows at once

This is not a programming question but an inconvenience in the android-studio editor. If you have an unwanted tab before all your lines, how can you remove them all at once? Now I have to manually go over 50 lines to remove all the tabs to make my code look clean. If you want to add multiple tabs at...
Daan Seuntjens
1

votes
2

answer
75

Views

“import” string in Android Studio

It's been a while since I touched Android Studio. I thought I recalled a feature where I could type some code, for example like public String UserName; And I thought there was a way to click on the text 'string' in the editor and maybe right click or a lightbulb would pop up that streamlined the pr...
Kyle Sweet
1

votes
1

answer
50

Views

Is there any keyboard shortcut for Gradle Sync Now in Android Studio?

Anyone know if there is any short key for App Level Gradle Syncing in Android Studio?
Ssubrat Rrudra
1

votes
1

answer
38

Views

Google Play console Signed apk version code error

I uploaded apk with next Version code only For example my previous version code is 23 now i uploaded apk with version code 24.But Google play console showing 'You uploaded an APK or Android App Bundle with an invalid version code, a version code must be specified and should be a positive integer' I...
Mohammed Nishar
1

votes
1

answer
35

Views

Can I have same Java file with different versions for debug and release?

I am developing an android application. I have an java file that I want to use it differently in debug and release build types. I know I can have different resource files for debug and release versions. But is it possible to do the same with Java files also? How to achieve this?
adarsh
1

votes
2

answer
27

Views

Android Studio dialect letter not working

I am having a question regarding dialect letter 'Ć' (Shift + Alt + c) which is not working (not visible) on Android Studio. I sometimes need it in the comments. How can I use the letter?
Annabelle
0

votes
0

answer
33

Views

In application are still old information from database, even if i change them in database

I got application from one guy(so it isn´t mine) and i don´t know java so well. Application must do : connect to url(http),where is json ,which is from database and show the information on screen. All connections are working , but when I change some information in database the application informat...
Edering
2

votes
0

answer
21

Views

package com.reactnativenavigation does not exist

I am a beginner in react native. Right now I am trying to integrate https://wix.github.io/react-native-navigation/#/ library to my react-native application. for now, I am targeting only the Android platform. I have performed all the steps that are mentioned in the documentation but when I tried to...
baj9032
0

votes
2

answer
22

Views

Gradle Build Variant window in Android Studio 3.4

I have updated Andorid Studio yesterday. Now I am unable to see the tab for changing gradle build variant. Is that option replaced somewhere?
Khemraj
0

votes
0

answer
17

Views

unchecking checkbox doesnt remove id from arraylist

I am doing functionality of checkbox and it is working fine for checked but when i uncheck the checkbox it gives error.. and one thing when i checked the checkbox i am storing id of that item into arraylist and i want to remove that id when uncheck the checkbox final CheckBox checkBox = listViewIte...
Swapnil Patil
-1

votes
1

answer
8

Views

Databinding-Classes aren't generated any more

I had a working project in Android-Studio, including Databinding. That eleminates some possible sources of error. ;-) Then I decided to get my feet wet with Kotlin and began to migrate some classes from Java to Kotlin. Unfortunately I also klicked to update Android-Studio to 3.4 in the middle of thi...
Sqrt-1764
0

votes
0

answer
5

Views

How to make a scrolling list of items in a menu, within a group, in navigation driver activity?

I'm adding to my app navigation driver activity. I need the list of menu items to scroll within the group. I had an idea to do it with ListView, but I didn't find a way to implement it. Maybe someone solved this problem and tell me what to do to the list of items within the group scrolled. Here is a...
DinaD
-1

votes
0

answer
16

Views

Starting a new activity from a fragment

I'm looking to start a new activity directly from a specific fragment. Currently, the error I'm getting is that onClickListener() can't be resolved. I had a lot of issues doing through inside onCreateView(), so now I'm attempting to do it inside onViewCreated(). public class TermsFragment extends F...
Matt Joslen
0

votes
0

answer
5

Views

How do I install Android Studio 3.5 Canary 12?

I need to install it, and downloaded the file, but it is in ZIP format. Inside the archive there is no install file, only `uninstall. How do I install it?
Tsabary
1

votes
1

answer
9.2k

Views

How to determine Android Full SDK Download size?

I'm asked to report Download size of Full Android SDK (Not Disk Size). On Disk : 49GB On Network (Downloaded Zip Files): ?GB Installed: Windows 7 x64 machine Tools till 24.3.1 Tool preview channel Android M Android API (22, 21,20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 8, 7, 4, 3) Extras (All Sup...
user3619918
5

votes
0

answer
191

Views

Aosp does not have tools/vendor/google3 project

When I build Android Studio from source code using: 'bazel build //tools/adt/idea/...' command can't always find 'tools/vendor/google3' module, isn't google no open source project? [email protected]:~/aosp/gradle_3.1.2$ bazel build //tools/adt/idea/... WARNING: ignoring http_proxy in...
yangzaiCN
0

votes
0

answer
2

Views

How to add click Counter, Store in Firebase and Retrieve

I'm beginner for developing. I'm using Android studio, I've created App that retrieve data from Firebase Realtime database. I know how to add operation for the click counter but it is not save EX:'when i click on the button the TextView change to ++1, but if i closed the application and reopen it ag...
Mohamed Soliman
1

votes
3

answer
12k

Views

Error in Android studio java.io.FileNotFoundException

I got error when I want to debbuging usb at my phone I cant display my code on android studio in my phone and the error looks like this: please help me I am using android studio 2.0 and my phone is ASUS Fone-Pad 8.0. Error:java.io.FileNotFoundException: C:\Users\Andrezs\AndroidStudioProjects\HappyS...
1

votes
2

answer
646

Views

taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger

After I update Android Studio to version 2.3, When I make my project I got this error /Users/xxx/Work/yyy/build.xml:96: taskdef A class needed by class com.android.ant.GetUiTargetTask cannot be found: com/android/utils/ILogger using the classloader AntClassLoader[/Users/xxx/Library/Android/sdk/tools...
user997274
1

votes
1

answer
758

Views

Android Studio 3.0 lint warnings for references to activity

After upgrading my project to use Android Studio 3.0 with API level 27.0.0 (Android 8.1) I get a lot of new lint warnings related to using getActivity() inside a fragment (which I thought was perfectly all right). Examples: ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); getActivit...
Ove Stoerholt
1

votes
2

answer
2k

Views

How to open AVD Manager GUI without opening Android Studio?

As I'm not developing my app with Android Studio, but I'm still using the Android emulator. What's a nice way for me start up my emulator without doing this? Open Android Studio Open some project Click the AVD Manager button I'm not looking for a complete CI replacement, but if there's a long comma...
Jeggy
1

votes
1

answer
3.3k

Views

Android Studio 3.1 cannot resolve symbol theme [duplicate]

This question already has an answer here: Android Studio 3.1 Cannot Resolve Symbol (Themes, Widget, attr, etc.) 16 answers Hi I just updated my Android studio to 3.1 and regret doing it it's wasting my whole morning help me pls. I'm using Gradle version 4.4 Gradle plugin 3.1
1

votes
1

answer
898

Views

why 'onBindViewHolder' Overrides Nothing Kotlin?

Please help me, I can't implement onBindViewHolder in my RecyclerView in Kotlin. I want to make an adapter for my data cards using Reyclerview in Kotlin language android studio. But when I implement onBindViewHolder my code throws an error. Please help. package com.brid.azis.vipgame.test.Adapter imp...
woyjez

View additional questions