android-studio-3.0

Android Studio can't build a fresh Project

梦想的初衷 提交于 2019-12-11 16:16:03
问题 Iam completly new to Android Studio. I did a fresh installation, but i cant even build a fresh Project. Java RE and JDK are also installed. FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:mergeDebugResources'. Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details it fails to find a bunch of files( a lot more to be exact): C:\Users\Kevin Me?mer\.gradle\caches\transforms

Android Studio Showing imports error

不打扰是莪最后的温柔 提交于 2019-12-11 15:22:31
问题 I previously had this issue but after this issue was resolved a new issue started coming up. The imports are showing error Cannot resolve the symbol x . For ex All the below are showing error. import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.view.WindowManager; import android.widget.LinearLayout; I have tested this on two project and for both the projects it is showing error. Any help would be grateful. 回答1:

my avd in android studio never starts. Black screen

别说谁变了你拦得住时间么 提交于 2019-12-11 15:17:05
问题 I am using the latest version of android studio and every time I try to launch an emulator, it does not show the bootup logo or anything just a black screen. Does anyone know how to correct this? 回答1: This problem is probably you created your AVD with x86 but your PC is 64-bit . Try to create an emulator with x86_64 architecture. See below screenshot: 回答2: What solved my problem is using an emulator that uses little RAM. In my case is a Nexus. Previously I was trying to launch in a Pixel 2 XL

Attempting to check Settings.System.canWrite(context) result

让人想犯罪 __ 提交于 2019-12-11 13:43:04
问题 I'm using Robolectric 3.5 and the latest from Android Studio 3.0 , and I'm attempting a piece of code, which needs to verify Settings.System.canWrite(Context context) was called and also do something with the true / false result. I've been checking around, and I cannot figure out how to set up this scenario with Robolectric. How do you approach it? //the settings write verifier class... ... public SettingsWriteVerifier(ctxt){ context = ctxt; } public boolean canWrite() { return Settings

Unable to build Android APK - Execution failed for task ':app:mergeDebugResources'

和自甴很熟 提交于 2019-12-11 12:13:26
问题 Some People marked this question as duplicate. But the issue is still not solved even after I tried all the methods which was given in similar question. aapt2.exe still throwing error and saying aapt2.exe is stopped working. I have developed a project in Mac machine and it's completely working fine in that. Now I wanted to move this project to another system so that other members can also work in it. When I installed Android Studio and open this same project in Windows machine its showing me

Infer Constraints in Android studio latest version(3.0)

别说谁变了你拦得住时间么 提交于 2019-12-11 06:48:41
问题 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? 回答1: You can use infer constraint in Android Studio 3.0 Just make sure you are in the "Design" tab and not the "Text" tab (seen near the bottom of the screen). Click on infer constraints 回答2: There IS

How to resolve this after successful build of app in android studio

核能气质少年 提交于 2019-12-11 06:42:41
问题 **Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex** 回答1: Step1: Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here: android { defaultConfig { ... minSdkVersion 15 targetSdkVersion 26 multiDexEnabled true } ... } dependencies { compile 'com.android.support:multidex:1.0.1' } Step 2: If you do override the

Error Conflict with dependency in android studio

喜夏-厌秋 提交于 2019-12-11 05:03:57
问题 I am getting this error in android studio when i try to create a new project. Please help me step to step to deal with it. I am completely new to this IDE. ERROR SCREENSHOT Error:Execution failed for task ':app:preDebugAndroidTestBuild'. Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details. 回答1: I found the solution

Android studio 3.0.1 shows Process finished with exit code -1073741819 (0xC0000005)

我的梦境 提交于 2019-12-11 01:07:57
问题 I am trying to use an marshmallow api 23 emulator on Android studio 3.0.1 on Win 7 64bit and getting this error: 7:03 PM Emulator: emulator: ERROR: detected a hanging thread 'QEMU2 CPU0 thread'. No response for 15000 ms 7:03 PM Emulator: Process finished with exit code -1073741819 (0xC0000005) In general ever since I have updated to 3.0.1 from 3.0 I have been getting endless AVD errors. If it helps, this error came right after I unticked the pcstore.bin from "Read-only". 回答1: I solved this

Android Studio 3.0 lint warnings for references to activity

走远了吗. 提交于 2019-12-11 00:55:16
问题 After upgrading my project to use Android Studio 3.0 with API level 27.0.0 (Android 8.1) I get a lot of new lint warnings related to using getActivity() inside a fragment (which I thought was perfectly all right). Examples: ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar); getActivity().getMenuInflater().inflate(R.menu.pavingreport_dialog_menu, menu); Both examples complains about null exceptions. Example: Method invocation 'getMenuInflater' may produce 'java.lang