android-studio-2.0

No cached version of com.android.tools.build:aapt2:3.6.1-6040484 available for offline mode

余生颓废 提交于 2020-07-19 11:15:43
问题 Is there any offline option present in gradle setting of the latest version of android studio ? 回答1: Just disable gradle offline mode and try, will work fine. To disable offline mode in Android Studio 3.6.1 Click on gradle window (on right side of studio) Select the project Click Toggle Offline Mode button (disable here) 回答2: Check the SDK version installed in android studio in starting configure SDK manager and check that what version of android is installed.Install other version of android

Android Studio Remove lint error

妖精的绣舞 提交于 2020-01-24 14:26:25
问题 I need to remove a lint error and I don't know how to do that. The problem is that lint is interpreting wrong a regex expression. As the expression is in UTF-16, the range is right, but it interprets it as UTF-8 then it detects an Illegal character range (from < to) exception on my EMOJI_REGEX . Although the lint error, the code is working fine, so I need to remove that lint error. How could I do that? private final static String EMOJI_REGEX = "([\\u20a0-\\u32ff\\ud83c\\udc00-\\ud83d\\udeff\

Android Studio 2.1 does not show local variables when debugging

南楼画角 提交于 2020-01-24 08:37:25
问题 My AS stopped showing local variables. Currently I'm using AS 2.1, but tried AS 2.0 and AS 1.5.1. It started some time ago, I guess with the update to 2.0. I've moved to the older version but it did not help. I'm using build tools 23.0.3, and gradle 2.1.0. I've also added testCoverageEnabled false to build.gradle. There are very little info about that issue around the internet, one I've found: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status

Android preview build tools alpha 5 won't deploy APK

假装没事ソ 提交于 2020-01-13 14:04:38
问题 Whenever I try to start an app, either by debugging or playing, after compiling with: dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha5' } I get the message: No local changes detected, not deploying APK. I get this even when there most certainly are changes, so I am unable to push any new changes to the device without actually moving the APK to the device and installing it manually. I've tried unchecking the "Skip installation if APK has not changed" configuration option,

How upload video/mp3 file on firebase android

假如想象 提交于 2020-01-04 05:46:08
问题 I am able to uploading/downloading images from firebase but do not know how upload video or .mp3 file on firebase in android.so suggest me. Thanks in advance. 回答1: Rewriting the example from the docs based on the answer given in Uploading MP3 file to Firebase Storage ends up being a video/mp3 file, it seems that a full working example of an audio upload would look something like this: // File or Blob file = Uri.fromFile(new File("path/to/audio.mp3")); // Create the file metadata metadata =

issue with gradle 2.0.0 and DataBinding

不羁岁月 提交于 2020-01-02 05:25:30
问题 Recently i have updated Android studio from 1.5.1 to 2.0, after updation it asked me to use latest gradle i.e. com.android.tools.build:gradle:2.0.0 dependencies { classpath 'com.android.tools.build:gradle:2.0.0' classpath "com.android.databinding:dataBinder:1.0-rc1" } But after updating it is showing error with DataBinding plugin. apply plugin: 'com.android.databinding' //error on this line Error message : Error:(2, 0) Cause: org/apache/commons/lang3/StringUtils Open File I have not used any

Android Studio 2.0 update - public static volatile com.android.tools.fd.runtime.IncrementalChange

眉间皱痕 提交于 2020-01-02 03:35:33
问题 After I update with Android 2.0 a new field has been added into my models object public static volatile com.android.tools.fd.runtime.IncrementalChange com.pr4.models.User.$change What problem I have faced : i.e I was reading the field using reflection package and creating a dynamic table using fields, and my app get crashed due to new field $change, If i put a check to skip particular modifier field then I have to make lot of changes. Why a new field was added at runtime in my code, how to

Back button in android webview within a fragment

余生颓废 提交于 2019-12-31 05:42:12
问题 I have created a webview within a fragment however when I am trying to press the back button, it is killing the app instead of going back. What i want is to go back when i press the back button and if i am already on home page the back button should kill the app. I have tried using all the solution in the given link. How to add "Go Back" function in WebView inside Fragment? Please help. 回答1: You can override the Activity's onBackPressed() method and check if there is any previous fragment in

Android studio 2.0 gradle transformClassesWithDexForDebug fails when using button “run”

限于喜欢 提交于 2019-12-29 19:25:14
问题 I have a problem after migration from android studio 1.5 to 2.0 In one of my project (only one) i can't use android studio run button, because then, build fails on gradle task "transformClassesWithDexForDebug" with error: :app:transformClassesWithDexForDebug AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is

Android studio 2.0 gradle transformClassesWithDexForDebug fails when using button “run”

妖精的绣舞 提交于 2019-12-29 19:24:02
问题 I have a problem after migration from android studio 1.5 to 2.0 In one of my project (only one) i can't use android studio run button, because then, build fails on gradle task "transformClassesWithDexForDebug" with error: :app:transformClassesWithDexForDebug AGPBI: {"kind":"error","text":"Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is