android-studio-3.0

Android Studio 3.0 gradle 3.0.0-beta2, breaks Kotlin Unit Test Coverage?

南笙酒味 提交于 2019-11-30 08:42:41
I have a simple Kotlin classes, as below class MyClass { fun justSayHello(yes: Boolean): String { if (yes) { return "Hello" } else { return "Sorry" } } } I have my test (written in Java here, could be in Kotlin, also) public class MyClassTest { private MyClass myClass = new MyClass(); @Test public void testFirst() { myClass.justSayHello(true); } @Test public void testSecond() { myClass.justSayHello(false); } } When I run a test with Coverage in Android Studio 3.0 Beta-2 using classpath 'com.android.tools.build:gradle:3.0.0-beta2' , no coverage is reported for it. But when I run the test using

Android Studio 3.0 Emulator: Could not lock voice for audioInputDeviceIOProc

强颜欢笑 提交于 2019-11-30 06:43:39
I seem to get this error while building my app on my emulator. I do not know what it the cause of it and it seems affecting my app which causes it my app to crash on the emulator. Emulator: coreaudio: Could not lock voice for audioInputDeviceIOProc Emulator: Reason: Invalid argument Audio input in the Android emulator is not super reliable right now. Until it's fixed you can disable it with these steps: Launch “AVD Manager” On the crashing image, click the downward facing icon in the actions column and select “Show on Disk” In the folder that was opened should be a config.ini file, open it in

Android profiler not supported for Kitkat devices/google glass in android studio 3.0

依然范特西╮ 提交于 2019-11-30 06:20:47
From android studio 3.0 Android Monitor turned to Android profiler . But, when using google glass device or other android kitkat devices it's showing below message in android profiler window: Device not supported. Android profiler requires a device with API 21(Lollipop) or higher. What's the solution for Kitkat devices to use the latest Android Profiler once android studio 3.0 available for update in stable version? It seems that the Android Device Monitor (Tools->Android->Android Device Monitor) is still available. I am having difficulty running its memory monitor, although it does seem to

Android Studio 3.1 does not render xml file due to a java class missing

时间秒杀一切 提交于 2019-11-30 05:21:31
Always shows me the error in the massages java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener My project is literally hello world and I just open android studios and click on the empty activity and then wait for the build to finish but it doesn't render the app. I reinstalled android studios and JDK10. but it doesn't work. the project shows fine in virtual device and i can even edit hello world to any string, but in XML view, it just shows a white screen . here is the stack: java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener at org

Missing project.gradle in Android View

為{幸葍}努か 提交于 2019-11-30 04:56:34
In Android Studio, project.gradle file is not show when in Android View, but is when in Project view Android View Project View How can I fix this ?? From the Gradle Tool Window in Android Studio (View > Tool Window > Gradle) , Right click on the the project's Gradle config with (root) next to its name. Click on Ignore Gradle project , and right click again then click on Unignore Gradle project . The trigger to this 'buggy' phenomenon actually lies outside your project folder. Assuming a project name of 'SilverBirch', try this: (a) Close the project in Android Studio 3.0.1. (b) Rename your

android studio emulator could not initialize DirectSoundCapture

跟風遠走 提交于 2019-11-30 04:41:10
问题 I just have a basic helloworld app in android studio 3.2 and I am trying to run some emulators to test the app with AVD manager, but the emulator just stucks in google logo and eventually android studio times out and stops trying to attack the app on the emulator meanwhile I see following errors in the event log. 4:25 PM Emulator: dsound: Could not initialize DirectSoundCapture 4:25 PM Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound

Android Studio 3.0 : canary 6 : android.content.res.Resources$NotFoundException inside Launching activity

旧城冷巷雨未停 提交于 2019-11-30 02:54:31
I update android-studio 3.0 from canary 5 to canary 6 and suddenly My app gives crash on KitKat(API 19) with below stacktrace. The Main2Activity.java:10 line is the first line in my activity onCreate() method. 07-11 13:00:39.523 8913-8913/dcpl.com.myapplication E/AndroidRuntime: FATAL EXCEPTION: main Process: dcpl.com.myapplication, PID: 8913 java.lang.RuntimeException: Unable to start activity ComponentInfo{dcpl.com.myapplication/dcpl.com.myapplication.Main2Activity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f070058 at android.app.ActivityThread.performLaunchActivity

Why Android change 'compile' to 'implementation' configuration in Gradle dependencies?

一笑奈何 提交于 2019-11-30 02:00:56
问题 As seen in Android Studio 3.0 (canary 3.0), we now add depedencies by declaring implementation instead of compile configuration. // Before compile 'com.android.support:appcompat-v7:25.3.1' // Currently implementation 'com.android.support:appcompat-v7:25.3.1' We can still use compile , but I would like to understand: What is the difference between implementation and compile configuration? Why do Android Gradle build change to use implementation as default? 回答1: It seems like compile has been

failed linking references after update of gradle Android Studio

橙三吉。 提交于 2019-11-30 01:19:13
I got this error after update my Gradle (I have also added maven{jitpack.io} and geofirestore dependencies at the same of updating Gradle) : Android resource linking failed Output: C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. C:\Users\Paul\AndroidStudioProjects\How2Ride2\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. C:\Users\Paul

Unable to compile under Android Studio 3.0 Canary 1

一笑奈何 提交于 2019-11-29 17:08:03
问题 I attempt to compile my Android project under AS 3.0 Canary 1 (it works fine on AS 2.3.2 stable version) but failed with the following error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:packageInstantRunResourcesUatGoogleDebug'. > com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor; * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.tasks