android-studio

Error in adding dependency in android

﹥>﹥吖頭↗ 提交于 2020-01-14 10:18:25
问题 When I have following code gradle is build successfully. ext { supportLibVersion = '23.2.1' // variable that can be referenced to keep support libs consistent } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile "com.android.support:appcompat-v7:${supportLibVersion}" compile "com.android.support:design:${supportLibVersion}" compile 'pl.pawelkleczkowski.customgauge:CustomGauge:1.0.1' compile "com.android.support:recyclerview-v7:${supportLibVersion}" compile "com.android

How to open dialer and get back to your app in one step in Android

一笑奈何 提交于 2020-01-14 09:57:53
问题 In my application I have a button with telephone number, and when user clicks on it the Dialer app is opened with the number in phone field. However if I want to get back from dialer to my app I should press 'Back' button 3 times. First press closes the dialer keyboard, second press brings me to dialer history menu, and only 3 press reopens my app. Is it possible to get back in 1 back button press? Here is my button OnClickListener vPhone.setOnClickListener(new View.OnClickListener() {

Can't generate APK after adding Google Analytics, but working fine in debug mode

大兔子大兔子 提交于 2020-01-14 09:14:05
问题 It's a very weird situation. I can build my project, clean and build my project and can even run on physical device with debug mode. I also get all the data that I require on Google Analytics web page. The sad part is, Android Studio is not generating release version, .apk file. I have followed exactly Add Analytics to Your Android App, the official tutorial , and also searched for many answers, but that exact problem is still there. My build.gradle looks like this: apply plugin: 'com.android

/dev/kvm is not found on Mac OS

落爺英雄遲暮 提交于 2020-01-14 08:20:11
问题 I recently updated my Macbook pro to Mac OS High Sierra. Now I'm running into an issue where I can no longer start the emulator in Android Studio. The warning /dev/kvm is not found. is shown. When I tried to start the emulator I get the following error: I tried different versions of Intel HAXM from the SDK manager and standalone, reinstalling Android Studio and completely removing all configurations, still the same issue.. 回答1: Go to: System Preferences > Security & Privacy > General There

Parse.com: with parseUser, how can I save data in a column I created in parse from the class?

二次信任 提交于 2020-01-14 08:06:09
问题 I am using Android Studio for my app and Parse for my database... and on the create an account page I have, it allows the user to enter in first name, last name, email, username, and password. But my code is using parseUser... I don't know how to set the first and last name in the database. I know setUsername, setPassword, setEmail is a part of it... but what about if you make a column in Parse? How can you add this in your class? This is a part of my code, what it looks like...my problem is

Second layout is not showing with include tag in android studio

无人久伴 提交于 2020-01-14 07:59:10
问题 I have designed two Android layouts which should be shown in order. So, the first layout must be showing in top of the page and the second layout must be showing in bottom of the page. However, the following code only shows the first layout. How can I show the second layout too? the main layout is <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="

What is the solution to Check internet connectivity [duplicate]

徘徊边缘 提交于 2020-01-14 07:09:26
问题 This question already has answers here : Test Internet Connection Android (3 answers) Closed 3 years ago . getnetworkInfo ' is deprecated , what is the solution? I am using compilesdkversion 24. 回答1: you can use getActiveNetworkInfo() instead of getnetworkinfo , because there were some other factors which weren't considered before ,like network state can vary app to app while using getnetworkinfo hence deprecated docs ConnectivityManager connectivityManager = (ConnectivityManager) context

Android Studio doesn't show options for create android projects

不打扰是莪最后的温柔 提交于 2020-01-14 07:05:27
问题 There is some problem with my android studio, as it not showing any option to create android apps. Help me out to reset it. I tried to delete it and re-install it but no good. 回答1: To reset Android Studio to default settings you need to move or delete its user settings folder. On Windows you will find it in C:\Users\Yourname\.AndroidStudio You can compress the folder to a zip file or something to back it up and then delete the folder contents. This will return all of the settings to fresh

Android Studio doesn't show options for create android projects

╄→尐↘猪︶ㄣ 提交于 2020-01-14 07:04:32
问题 There is some problem with my android studio, as it not showing any option to create android apps. Help me out to reset it. I tried to delete it and re-install it but no good. 回答1: To reset Android Studio to default settings you need to move or delete its user settings folder. On Windows you will find it in C:\Users\Yourname\.AndroidStudio You can compress the folder to a zip file or something to back it up and then delete the folder contents. This will return all of the settings to fresh

Android Studio doesn't show options for create android projects

删除回忆录丶 提交于 2020-01-14 07:04:28
问题 There is some problem with my android studio, as it not showing any option to create android apps. Help me out to reset it. I tried to delete it and re-install it but no good. 回答1: To reset Android Studio to default settings you need to move or delete its user settings folder. On Windows you will find it in C:\Users\Yourname\.AndroidStudio You can compress the folder to a zip file or something to back it up and then delete the folder contents. This will return all of the settings to fresh