android-studio

import kotlinx.android.synthetic.main.activity_main is not working

大兔子大兔子 提交于 2020-12-30 04:57:01
问题 Import kotlinx greyed out I think i try nearly everything. Reinstall Android Studio, Invalide Cache, new Project same Problem. i just can't find the Solution 回答1: Can you try File | Invalidate Caches / Restart Deleting .idea folder Clean Re-import the project OR just remove apply plugin: 'kotlin-android-extensions' , sync gradle plugin and then I added it again. 回答2: Check "build.gradle(:app)" file, plugins { id 'com.android.application' id 'kotlin-android' } if kotlin extension is missing,

import kotlinx.android.synthetic.main.activity_main is not working

时光毁灭记忆、已成空白 提交于 2020-12-30 04:55:35
问题 Import kotlinx greyed out I think i try nearly everything. Reinstall Android Studio, Invalide Cache, new Project same Problem. i just can't find the Solution 回答1: Can you try File | Invalidate Caches / Restart Deleting .idea folder Clean Re-import the project OR just remove apply plugin: 'kotlin-android-extensions' , sync gradle plugin and then I added it again. 回答2: Check "build.gradle(:app)" file, plugins { id 'com.android.application' id 'kotlin-android' } if kotlin extension is missing,

How to set dynamic initialRoute based on sharedPrefs value in flutter?

让人想犯罪 __ 提交于 2020-12-30 02:39:08
问题 Currently, I am working around routes and i wanted to set initialRoute in my app based on sharedPreferences value. I am using Statedulwidget for my MaterialAppWidget and using setState() method once the data from sharedPrefs is fetched. But, every time i am getting the same screen. class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { int initScreen = 0; initPrefs() async { SharedPreferences prefs = await

In Android studio where to find custom templates path

空扰寡人 提交于 2020-12-29 19:51:26
问题 In Android studio, I am trying to create new Java templates by following the below steps Android Studio --> File --> Edit File Template --> Added New file with java extension.--> Added required code I am able to use this template for creating new files. But I want to see this template path.Where these are located? I can see Android studio predefined templates in /AndroidStudio/plugin/android/lib/templates BUT not seeing my newly created templates. Anyone has any idea where new created

In Android studio where to find custom templates path

落爺英雄遲暮 提交于 2020-12-29 19:51:12
问题 In Android studio, I am trying to create new Java templates by following the below steps Android Studio --> File --> Edit File Template --> Added New file with java extension.--> Added required code I am able to use this template for creating new files. But I want to see this template path.Where these are located? I can see Android studio predefined templates in /AndroidStudio/plugin/android/lib/templates BUT not seeing my newly created templates. Anyone has any idea where new created

In Android studio where to find custom templates path

旧城冷巷雨未停 提交于 2020-12-29 19:50:15
问题 In Android studio, I am trying to create new Java templates by following the below steps Android Studio --> File --> Edit File Template --> Added New file with java extension.--> Added required code I am able to use this template for creating new files. But I want to see this template path.Where these are located? I can see Android studio predefined templates in /AndroidStudio/plugin/android/lib/templates BUT not seeing my newly created templates. Anyone has any idea where new created

Android SDK path on Mac missing

柔情痞子 提交于 2020-12-29 15:43:30
问题 Currently running Android Studio 2.1.2 on Mac OS X El Capitan. I'm trying to locate the path of the Android SDK; when I go to File -> Project Structure to check the Android SDK location, I get the following: /Users/username/Library/Android/sdk However, I can't find this folder on my system, there's no 'Library' folder under my user directory? I also tried showing hidden files but that didn't help. I'm pretty new to Android development so any help would be appreciated, thanks. 回答1: Library is

Android SDK path on Mac missing

前提是你 提交于 2020-12-29 15:40:08
问题 Currently running Android Studio 2.1.2 on Mac OS X El Capitan. I'm trying to locate the path of the Android SDK; when I go to File -> Project Structure to check the Android SDK location, I get the following: /Users/username/Library/Android/sdk However, I can't find this folder on my system, there's no 'Library' folder under my user directory? I also tried showing hidden files but that didn't help. I'm pretty new to Android development so any help would be appreciated, thanks. 回答1: Library is

Android Studio refuses to run main()

徘徊边缘 提交于 2020-12-29 09:19:03
问题 Repro steps: Start a new project in Android Studio (with the latest update); Make a new class and add main() as usual; Right-click class to run main() as a test. package test; public class Test { public static void main(String[] args) { } } Usually I expect I can just System.out.printLn("Hello World") but this time, no matter if it's a new project, I get the following error: 2:34:23 PM: Executing task 'Test.main()'... Executing tasks: [Test.main()] in project C:\Users\regan\Desktop\events

Error when building project with NDK support after updating to Android Studio 4.0 from 3.6

人走茶凉 提交于 2020-12-29 09:17:06
问题 After updating Android Studio to 4.0 project build finishes with error More than one file was found with OS independent path 'lib/armeabi-v7a/libdlib.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake The link leads to the page with New features in Android Studio Preview which is 4.1 EDIT Actually you can find information that is linked in Google cache: Automatic