android-studio

Android Studio Layout preview not showing design

≯℡__Kan透↙ 提交于 2020-01-11 13:50:14
问题 I am currently working on a project and everything was fine. Today, while I opened android studio, the design/layout preview showing white screen only. (Like the picture) I did try: Invalidate Cache and Restart Force Layout Refresh Downgrading appcombat to 27.1.1 Adding Base.Theme in style.xml But, nothing worked. No Build errors, runs fine in emulator and design shows in emulator, but not in android studio. Any solution would be a great help, also let me know if you need more details. Even a

Unable to resolve all dependencies in android studio 3.0.1

只谈情不闲聊 提交于 2020-01-11 13:22:13
问题 Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app No cached version of com.android.support:appcompat-v7:26.1.0 available for offline mode. Error:Could not resolve all files for configuration ':app:debugCompileClasspath'. Could not resolve com.android.support:appcompat-v7:26.1.0. Required by: project :app No cached version of com.android

I have a checkbox inside a fragment and i want it to post some data on click of a register button this button is inside my main activity?

强颜欢笑 提交于 2020-01-11 13:14:09
问题 I am working for the 1st time in fragment...in main activity i have a spinnerListner and as the item changes in spinner, in fragment container... fragments changes accordingly and i have just created some checkboxes in fragment.xml files... i just want to post and store a different value "NameoftheCheckbox" for every checked checkbox and another valuelike"Null" for every unchecked checkbox(even from the fragments which is not showing in container) on every registration click. like the way i

can I add an image header in navigation drawer layout

狂风中的少年 提交于 2020-01-11 12:14:07
问题 how can i add an image header to my navigation drawer layout like this one and this is my code : MainActivity.java package com.webileapps.navdrawer; import android.app.AlarmManager; import android.app.AlertDialog; import android.app.PendingIntent; import android.content.Context; import android.content.DialogInterface; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import

“The command line is too long” error in dexDebugTest build task

旧巷老猫 提交于 2020-01-11 12:10:11
问题 I followed this link to set up test cases in Android Studio: But if I try to run some tests in my project I get the following error: **Execution failed for task ':common_lib_app:dexDebugTest'.** > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android_studio\sdk\build-tools\19.1.0\dx.bat --dex --num-threads=4 --output D:\Android\android_studio\ update error: The command line is too long. FAILED FAILURE: Build failed with an

Gradle error in Android Studio 0.4.3

时间秒杀一切 提交于 2020-01-11 12:04:27
问题 I found references to this with an older version, but not the most recent. I updated Android Studio to 0.4.3 and created a new project. The build fails immediately with the below: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10

Trouble Publishing Android Studio Library on jCenter with Bintray

醉酒当歌 提交于 2020-01-11 10:23:16
问题 I'm following this tutorial to publish an example Android Studio library on Jcenter: http://crushingcode.co/publish-your-android-library-via-jcenter/ It seems very clear. I've created my GitHub repository with this library at this link: https://github.com/alessandroargentieri/mylibview I've also Signed in to Bintray.com, and created a new repository which must contain my library (as explained in the tutorial above). To publish a repository on Bintray I must create an organisation, then you

Android Studio Excessive Memory Usage When Running Espresso UI Tests

China☆狼群 提交于 2020-01-11 10:18:26
问题 I notice that when running Espresso UI tests on an emulated device my system's memory usage increases indefinitely until I restart Android Studio and my emulated device. On inspection I can see that my Android Studio and emulated device memory usage remain constant, yet overall memory usage increases. However I cannot see where the additional memory is assigned in my system monitor. This happens even when running empty tests on a blank activity! Please see code attached I am running Android

Android Studio: Are Library Project dependencies picked from project.properties?

独自空忆成欢 提交于 2020-01-11 10:01:29
问题 I have imported my project from ADT and after going to "Module Settings" and editing dependencies things are working fine. My "build.gradle" has dependencies block empty, So I am wondering from where is Ansdroid-Studio picking libraries dependencies ? As I migrated from eclipse so I have project.properties file in module directory. Does Android-studio pick these things from "project.properties" file ? 回答1: Android Studio's default project support is done through Gradle, unless you have an

Android studio 3.0 error, how can I get rid of it?

走远了吗. 提交于 2020-01-11 09:53:35
问题 I just update my android studio to 3.0 now, but when I try to build apk on my project, it's shows following error: Project depends on com.google.android.support:wearable:2.0.0, so it must also depend (as a provided dependency) on com.google.android.wearable:wearable:2.0.0 My build.gradle is like that: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile project(':lpd') compile 'com.google.android.support:wearable:2.0.0-alpha2' compile 'com.google.android.gms:play-services