天道酬勤,学无止境

android-studio

Places API autocomplete problems

Hi I'm new to android and am setting up the autocomplete code for the places api. I was following the google dev instructions on their website and ran into a problem that I can't seem to find any answers on. I can't seem to find any info on what i am supposed to put for ID and NAME on the first line. There are no auto complete suggestions that come up and I haven't been able to find any info on it on the official documentation. I believe I have imported everything that I need to as I don't have any errors anywhere else in the code. This is the guide I am following. I am in the section to add

2021-09-24 15:43:46    分类:问答    android   android-studio   google-maps   kotlin   google-places-api

Performance issues when running Android Studio Profiler: The IDE is running low on memory

When running Android Studio Profiler I get this message at the bottom after generating two or three "heap dumps": The IDE is running low on memory and this might affect performance. Please consider increasing available heap. My PC runs really slow after getting this message even after stopping the profiler and the only option to restore performance is restarting Android Studio. Why is this happening? Is there any other way to restore the performance after generating a heap dump on a project?

2021-09-24 10:53:07    分类:问答    android   android-studio   profiler   low-memory   android-profiler

Unable to set SDK path or download that in Android Studio 3.6?

I installed Android Studio 3.6 on Windows 10 from here downloaded but when check Android SDK manager ( tools>SDK manager ) on Android Studio show me "target folder is neither empty nor does it point to an existing SDK installation" error and empty path for SDK. I download some android SDK. but don't work all of them. Android Studio show me SDK is installed and not permit me checked check box of download/update SDK

2021-09-24 08:11:21    分类:问答    android-studio   android-sdk-manager

Gradle test 命令没有运行任何测试(Gradle test command not running any tests)

问题 我有一个可以在 Android Studio 上运行的简单测试实现。 此类位于我的项目的 /src/androidTest 目录中。 应用测试.java: public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } @Override protected void setUp() throws Exception { createApplication(); } @SmallTest public void testSample() { assertEquals("Pass: ", 50, 50); assertEquals("Fail: ", 50, 49); } } 但是当我尝试使用以下命令通过 gradle 运行时,没有任何运行。 我正在尝试的 Gradle 命令: ./gradlew test 输出: c-08e-abaek-0:HelloTest abaek$ ./gradlew test :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app

2021-09-24 07:56:40    分类:技术分享    android   android-studio   gradle

Application icon not showing after Gradle plugin update to 3.0

I want to upgrade my Android Plugin for Gradle from 2.3.3 to 3.0.1. I could fix all the errors following the Migration Guide. My problem now is that on Android Nougat (24) and Android Marshmallow (23) application icon is replaced with the default robot icon. Could you help me find the reason for the problem. Previously icon was shown and I don't see logical reason why not now. I tried all suggestions here without success. Here is my Manifest file: <!-- Permissions --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK

2021-09-24 07:40:34    分类:问答    android   android-studio   android-gradle-plugin   aapt2

Android Studio 项目构建问题(Android Studio project build issue)

问题 我最近在Android Studio遇到了一些奇怪的问题。 我正在尝试在对代码进行一些修改后构建一个项目。 但是安装的APK是旧代码。 (我通过debugging找到了这个。当我debugged它会变成空行)但是我所有的最新代码都被保存了,它就在那里。 我已经尝试了我知道的以下步骤。 Delete the build folders of Project and Module manually > Restart Studio > Clean Project > Rebuild Project Restart Android Studio和(我不知道为什么我重新启动,但我也这样做了) Invalidate and Cache Restart 在某些时候,我在XML发现了一个与按钮的style属性相关的问题,例如 style:attr/buttonBarButtonStyle 我后来更正为 style:"?android:attr/buttonBarButtonStyle"我希望这个更改是正确的,因为它没有显示任何更多的错误。 最后它在堆栈跟踪中没有给我任何错误。 项目总是显示BUILD SUCCESSFUL 以上都没有帮助我。 编辑 1:我已将我的Android Support Library更新到22.1.1发布的22.1.1最新版本 编辑 2:我卸载了Android

2021-09-24 07:34:41    分类:技术分享    android   android-studio

Android studio: preDexDebug failed

I got an error building android project, even a hello world project: Console output: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:preDexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Applications/Android Studio.app/sdk/build-tools/19.1.0/dx --dex --output /Users/luyaochen/Documents/and/MyApplication3/app/build/intermediates/pre-dexed/debug/internal_impl-20.0.0-20e875ec0585f022fce03f5b07d31a0222ca3f58.jar /Users/luyaochen/Documents/and/MyApplication3/app/build/intermediates/exploded-aar/com.android.support

2021-09-24 07:17:23    分类:问答    android   android-studio   android-build

Android Studio: How to exclude Doc Folder from Search and other functionality?

I have a huge auto-generated documentation folder in my Android project. Unfortunately, all the auto-generated doc files clutter the refactoring and search functionality of Android Studio (e.g. rename, find references, search and replace). An obvious solution would be to move the entire Android Studio project to a subfolder of the git repo, but I want to avoid this route. How can I make Android Studio ignore a selected documentation folder? I have one more requirement: The solution must work for all fellow developers who clone the repo. I do not want any configuration that must be manually

2021-09-24 07:05:27    分类:问答    android   android-studio   intellij-idea   javadoc

Gradle 中的 InstallDebug 在哪里? 如何安装测试 Android 应用程序?(Where is InstallDebug in Gradle? How to install a test Android App?)

问题 我正在尝试在我的测试设备上安装我在 Android Studio 中开发的 Android 应用程序。 我通常使用名为“InstallDebug”的 Gradle 任务执行此操作。但是,在我新创建的项目中,我现在在 Gradle 任务列表中看不到此任务了。从 Install* 开始,我看到的唯一两件事是 安装默认风味调试安装默认风味测试 有人知道我需要使用哪个 Gradle 任务来在手机上安装我的应用程序来测试它吗? 回答1 现在你会发现这个任务: gradlew install<Flavor><Build Type>. 示例:2 种风格f1,f2和 2 种构建类型debug, release 。 你会找到: installF1Debug - Installs the Debug build for flavor f1 installF1DebugTest - Installs the Test build for the f1 build installF1Release -- Installs the Release build for flavor f1 installF2Debug - Installs the Debug build for flavor f2 installF2DebugTest - Installs the Test build for the

2021-09-24 06:33:06    分类:技术分享    java   android   gradle   android-studio

Infer Constraints in Android studio latest version(3.0)

In this image there is a wiggy line to the button. Usually in the previous android version I used to select infer constraints so that the wiggy line gets disappeared. Now in the latest android version there is no option for infer constraints. Is there any other alternative to remove wiggy line?

2021-09-24 05:29:39    分类:问答    android   android-layout   android-studio   android-constraintlayout   android-studio-3.0