android-studio

dependencies by flavor in android studio build.gradle file, is it possible?

北城以北 提交于 2020-01-06 20:23:49
问题 image in my build.gradle file i have the following dependencies: dependencies { compile 'com.android.support:support-v13:22.1.1' compile 'com.android.support:appcompat-v7:22.1.1' compile 'com.jakewharton:butterknife:6.0.0' } and imagine i have the following product flavors defined: productFlavors { germanyMock { applicationId "org.mymocksite.mock" } usaMock { applicationId "org.myqasite.qa" } } suppose i want to have a dependency by flavor only, then could i do this: dependencies { compile

How do you pass an image path between two activities without getting outofMemory error?

北城余情 提交于 2020-01-06 20:23:47
问题 So basically, a user click a button and it grabs an image from the gallery. Then that image is sent to another activity to be displayed. This is my first activity where I grab the image. private void grabImage() { Intent imageGetter = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(imageGetter, RESULT_LOAD_IMAGE); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,

Error with sharing Android Studio project with GitHub

混江龙づ霸主 提交于 2020-01-06 19:53:07
问题 So when I try to share my project with GitHub through Android Studio, it says I have done it successfully, and a new repository is created, but when I open the repository, it is empty. I'm pretty inexperienced with GitHub, and I have spent hours trying different things and I can't get it to work, so if someone could help point me in the right direction, I would be extremely appreciative. 回答1: Here are the steps for seamlessly working with Android Studio and github Create a new project in

Error adding Google Identity Toolkit with Gradle

老子叫甜甜 提交于 2020-01-06 19:51:43
问题 I am trying to add the Google Identity Toolkit to my Google App Engine backend in Android Studio using Gradle. But I'm new to Android Studio and Gradle. I have added the following to my backend build.gradle: repositories { mavenCentral() } dependencies { compile 'com.google.apis:google-api-services-identitytoolkit:v3-rev191-1.20.0' } After a sync and gradle build I try to added an import: import com.google.identitytoolkit.GitkitClient; But I am getting the following errors: cannot resolve

Error adding Google Identity Toolkit with Gradle

百般思念 提交于 2020-01-06 19:51:21
问题 I am trying to add the Google Identity Toolkit to my Google App Engine backend in Android Studio using Gradle. But I'm new to Android Studio and Gradle. I have added the following to my backend build.gradle: repositories { mavenCentral() } dependencies { compile 'com.google.apis:google-api-services-identitytoolkit:v3-rev191-1.20.0' } After a sync and gradle build I try to added an import: import com.google.identitytoolkit.GitkitClient; But I am getting the following errors: cannot resolve

Display stack trace in Android Studio - it's disappeared

怎甘沉沦 提交于 2020-01-06 19:51:12
问题 Very dumb, very basic question, but this has been frustrating the hell out of me, so here goes. My stack trace has disappeared in Android Studio. All Logcat shows is crap like this: 8:34:36 PM Gradle build finished in 16 sec 8:41:30 PM Gradle build finished in 10 sec 8:43:05 PM Gradle build finished in 8 sec 8:43:07 PM Session 'app': running 8:45:18 PM Gradle build finished in 10 sec 8:45:20 PM Session 'app': running No stack trace, no nothing, and I know for sure that there are exceptions I

Android Google Map show blank screen

痞子三分冷 提交于 2020-01-06 19:49:15
问题 i start android studio with the default google map : add my key in google_maps_api.xml and i am sure about path: this is my manifast: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.erfan.google"> <!-- The ACCESS_COARSE/FINE_LOCATION permissions are not required to use Google Maps Android API v2, but you must specify either coarse or fine location permissions for the 'MyLocation' functionality. --> <permission

Android Studio 0.8.6: Failure [INSTALL_FAILED_OLDER_SDK]

扶醉桌前 提交于 2020-01-06 19:35:06
问题 Debugging my app with Android Studio 0.8.6, I get the error: "Failure [INSTALL_FAILED_OLDER_SDK]" My build.gradle looks like this: apply plugin: 'com.android.application' android { compileSdkVersion 'android-L' buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.bla.towerofhanoi" minSdkVersion 14 targetSdkVersion 'L' versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }

Android Spinner will not launch OnItemSelected and current selected item is not displayed in Spinner

耗尽温柔 提交于 2020-01-06 18:15:10
问题 Here is a simple gif of the application in action to show what I mean: Video Gif here I have a Spinner and here is my XML code for it: <Spinner android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/uniSpinner" android:layout_weight="1.5" android:spinnerMode="dialog" android:prompt="@string/type_default"/> I have followed a few tutorials and browsed around on here to dynamically add content to the spinner using parse.com. The content is added successfully but

Android Spinner will not launch OnItemSelected and current selected item is not displayed in Spinner

我们两清 提交于 2020-01-06 18:14:10
问题 Here is a simple gif of the application in action to show what I mean: Video Gif here I have a Spinner and here is my XML code for it: <Spinner android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/uniSpinner" android:layout_weight="1.5" android:spinnerMode="dialog" android:prompt="@string/type_default"/> I have followed a few tutorials and browsed around on here to dynamically add content to the spinner using parse.com. The content is added successfully but