android-studio

Cannot access 'androidx.activity.result.ActivityResultCaller'

巧了我就是萌 提交于 2021-02-18 22:39:44
问题 I'm using androidx for quite a while and my Android project compiles fine, however recently my Android Studio throws tons of red for all Activity classes because of cannot access 'androidx.activity.result.ActivityResultCaller' which is a supertype of ... I use AppCompatActivity from androidx.appcompat:appcompat:1.1.0 My build.gradle has: ext.kotlin_version = '1.3.71' ... dependencies { classpath 'com.android.tools.build:gradle:3.6.3' classpath 'com.google.gms:google-services:4.3.3' And gradle

On Android Studio 2.2.3 Gradle sync failed: Cause: error=13, Permission denied on Linux Mint 18

断了今生、忘了曾经 提交于 2021-02-18 22:33:07
问题 On Android Studio 2.2.3 when I am creating a new project or opening previous projects then the following pop ups: Gradle sync started 7:55:26 AM Gradle sync failed: Cause: error=13, Permission denied Consult IDE log for more details (Help | Show Log) what should I do? Please help. This is important. 回答1: On Android Studio folder, do chmod 777 * -R I think this not the best answer but it worked for me. 回答2: I solved this by going to the directory that contained the android-studio folder, which

Android Studios doesn't understand Log function

我们两清 提交于 2021-02-18 20:43:53
问题 I'm fairly new to android programming in general, and I'm having problems with printing to my log. I'm using Log.v() to do it, but I get an error: "cannot resolve symbol v" This is the code: import android.util.Log; public class DressDatabase { Dress[] dresses; private static final String TAG = "Testing: "; public DressDatabase(){ dresses = new Dress[15]; } Log.v(TAG, "String"); } 回答1: Try this: import android.util.Log; public class DressDatabase { Dress[] dresses; private static final String

Android Studios doesn't understand Log function

旧街凉风 提交于 2021-02-18 20:42:58
问题 I'm fairly new to android programming in general, and I'm having problems with printing to my log. I'm using Log.v() to do it, but I get an error: "cannot resolve symbol v" This is the code: import android.util.Log; public class DressDatabase { Dress[] dresses; private static final String TAG = "Testing: "; public DressDatabase(){ dresses = new Dress[15]; } Log.v(TAG, "String"); } 回答1: Try this: import android.util.Log; public class DressDatabase { Dress[] dresses; private static final String

Android Studio: No build variant found error

不羁的心 提交于 2021-02-18 20:17:55
问题 i am new to android development, i started developing from scratch on a project i bought online, following the documentation, i encountered a error saying No variants found for 'app'. Check build files to ensure at least one variant exists. Here is the build.gradle code apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.1" defaultConfig { applicationId "com.app-10.app" minSdkVersion 23 targetSdkVersion 29 versionCode 1 versionName "1.0"

Android Studio: No build variant found error

天大地大妈咪最大 提交于 2021-02-18 20:17:14
问题 i am new to android development, i started developing from scratch on a project i bought online, following the documentation, i encountered a error saying No variants found for 'app'. Check build files to ensure at least one variant exists. Here is the build.gradle code apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.1" defaultConfig { applicationId "com.app-10.app" minSdkVersion 23 targetSdkVersion 29 versionCode 1 versionName "1.0"

Android Studio: No build variant found error

99封情书 提交于 2021-02-18 20:16:23
问题 i am new to android development, i started developing from scratch on a project i bought online, following the documentation, i encountered a error saying No variants found for 'app'. Check build files to ensure at least one variant exists. Here is the build.gradle code apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.1" defaultConfig { applicationId "com.app-10.app" minSdkVersion 23 targetSdkVersion 29 versionCode 1 versionName "1.0"

How to change body of function TODO() generated on Kotlin?

时光怂恿深爱的人放手 提交于 2021-02-18 18:47:56
问题 I need leave something to do later on my code and TODO() auto generated produces a very long comment like follow TODO("not implemented") //To change body of created functions use File | Settings | File Templates. The above line tell me to go to File -> Setting -> File Template to change it, but this option not exists to TODO() functions. How to solve it? 回答1: Go to the Preferences window in Android Studio, select Editor -> File and Code Templates , open the Code tab, there you will find an

Flutter error on building files in Android Studio

孤者浪人 提交于 2021-02-18 17:54:05
问题 I have newly installed Flutter on Android Studio. I had a source code of flutter which I want to open using it. I installed the latest flutter plugin and flutter SDK. But when I try to run the app, it shows me the following error: Compiler message: /C:/Flutter%20SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments. PictureStream(); ^^^^^^^^^^^^^ /C:

No Cached Version Gradle Plugin Available for offline mode

核能气质少年 提交于 2021-02-18 17:43:06
问题 I haven't used Android Studio in a while, but decided to update everything and create a new project and I get the above error, if I go to Preferences -> Build, Execution, Deployment -> Gradle. There's no option to 'Work Offline' as suggested here among other places No cached version of gradle available for offline mode I've also used the 'Command Shift A' and searched for 'Offline' and I get nothing. Anyway to disable this? 回答1: As per the Android Studio 3.6 release notes: To enable or