android-studio

Attempt to invoke virtual method on a null object reference with set on click listener

邮差的信 提交于 2020-01-26 03:58:05
问题 I am trying to have a button within a popup send a variable to another class. However, when setting the on click listener I get this issue. I have initialized the button and tried to move the code to a different location. I have removed some of the code after the issue as it is not relevant import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import android.Manifest; import android.annotation.SuppressLint; import

Android studio Aapt.exe finished with non zero exit value 1

ぃ、小莉子 提交于 2020-01-25 23:41:04
问题 In My app I am using google play services and some others and all are working fine as expected. but when I comes towards the design side , I was asked to used the segmented control as we have in IOS 7. so for this I tired using this library. But as i added this library and sync I got this error Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Stacy Data\AndroidStudio

Text box in android

流过昼夜 提交于 2020-01-25 21:05:05
问题 I wonder where can I get the text box (as shown in diagram below) at the left panel of android studio ? As I can see, there only has textFields which has a line below the text but not text box. 回答1: It's called EditText . I believe in Android Studio it is the TextField which has a line below. Just using a different theme. To get the TextBox look you need to use one of the old themes like `@android:style/Theme.Light for your application. 回答2: There is no such object "TextBox" in Android. What

Android studio 1.5.1 cannot build

前提是你 提交于 2020-01-25 21:04:58
问题 Lately, I encounter a lot of problems using Android Studio. I'm using Android Studio 1.5.1, with gradle plugin 1.5.0 (corresponding to Gradle 2.2.1, I think), on Windows 7. There is no update for Android Studio for now, and neither in standalone SDK manager. Sometimes when I try to launch my app on an emulator, the builing process wont stop (I waited for 1 hour once...). Even after I quit the emulator and just build project on sync gradle, it launch a process that never ends. The log file is

Text box in android

只愿长相守 提交于 2020-01-25 21:04:21
问题 I wonder where can I get the text box (as shown in diagram below) at the left panel of android studio ? As I can see, there only has textFields which has a line below the text but not text box. 回答1: It's called EditText . I believe in Android Studio it is the TextField which has a line below. Just using a different theme. To get the TextBox look you need to use one of the old themes like `@android:style/Theme.Light for your application. 回答2: There is no such object "TextBox" in Android. What

Android Studio: How to get an ImageView to move in the direction of rotation

亡梦爱人 提交于 2020-01-25 17:21:46
问题 This question has been stuck on my mind for a while, and im wondering if im missing a method or something.Im trying to figure out how i can get an imageview in Android Studio(IDE) to move in the direction of its rotation, though this image probably best explains my question 回答1: So I found out how to do it with the help of some links and i formulated my own solution. First, I calculate how much I am adding/subtracting from the image's x and y using its current rotation with some Trig. The

Google Drive Api can't connect/authorize to google account

三世轮回 提交于 2020-01-25 16:35:32
问题 I am trying to build an android app that integrates google drive api and uses the drive as the storage storage for it however I am after running into issue with it from the very beginning. I've been trying to follow the official guide available at: https://developers.google.com/drive/android/get-started and also another guide I found https://www.numetriclabz.com/integrate-google-drive-in-android-tutorial/ and even downloading the source code and just replacing my API Key however with both of

Gradle DSL Method not found: 'multiDexEnabled'; using gradle that does not contain the method

大兔子大兔子 提交于 2020-01-25 15:53:56
问题 This question has been asked before, however, I have followed the directions carefully and am still receiving this issue. I need some help with figuring out what I am missing with my particular situation. Here is what I have done. 1) Add android-support-multidex.jar: Added android-support-multidex.jar to projected libs folder 2) Edit project build.gradle: I modified my build.gradle file located in my project's folder. apply plugin: 'android' dependencies { compile fileTree(dir: 'libs',

Gradle DSL Method not found: 'multiDexEnabled'; using gradle that does not contain the method

本秂侑毒 提交于 2020-01-25 15:52:27
问题 This question has been asked before, however, I have followed the directions carefully and am still receiving this issue. I need some help with figuring out what I am missing with my particular situation. Here is what I have done. 1) Add android-support-multidex.jar: Added android-support-multidex.jar to projected libs folder 2) Edit project build.gradle: I modified my build.gradle file located in my project's folder. apply plugin: 'android' dependencies { compile fileTree(dir: 'libs',

Android Studio connect with existing SQLite database

无人久伴 提交于 2020-01-25 11:33:12
问题 i have one application with SQLite database and then i create another application that can connect to the database that i created one, my question is, is it possible connect the existing database without copying the existing once ? if possible can any one give me a sample code to connect my existing database . the name of my database is "SEIS" and the Table is Proinfo . 回答1: By default, each app's files are private to the app. You could tell Android that your two apps should get permission to