android-studio-3.0

Cannot run my app, asking to select Android SDK

眉间皱痕 提交于 2019-12-06 07:16:38
问题 Today I've installed Android Studio Canary 1 Now I cannot run my app. This following dialog appears. I've already set the right SDK location through File-> Project Structure-> Android SDK location. Expecting your help to solve this problem. Warning Dialog image: 回答1: Go to project structure settings and set Source Compatibility and Target Compatibility to your current java development kit version: 回答2: Just you need to sync your project file with your gradle file. File -> Sync Project with

Using a prebuilt shared Library in Android Studio (cmake)

自闭症网瘾萝莉.ら 提交于 2019-12-06 03:05:11
问题 I want to use a C++ shared library inside my Android App. I tried to follow along the hello-libs example from Google's NDK samples, but somehow it doesn't work out. It seems, that my library isn't packed into the APK. All tutorials i found are using *.mk -files, but I want to use cmake . This is my CMakeLists.txt: # Sets the minimum version of CMake required to build the native library. cmake_minimum_required(VERSION 3.4.1) # native lib add_library(native-lib SHARED native-lib.cpp) set(IMPORT

Android Studio 3.0.1 NDK fatal error: stdint.h: No such file or directory

荒凉一梦 提交于 2019-12-06 01:53:48
My Application having native code was running perfect with previous Android Studio version. I just Updated to 3.0.1 and getting this error /Users/salman.nazir/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include/stdint.h fatal error: stdint.h: No such file or directory I checked the directory, stdint.h file is there in the mentioned path. Should i need to set something to get that file accessed? Note : I am using MacOS I just remove the ndk-bundle (latest version 16) folder from the SDK folder and put there older

Gradle error transformDexArchiveWithDexMergerForDebug when running application

房东的猫 提交于 2019-12-05 22:37:39
My application builds fine and I can create a signed apk but when I try to actually debug it on my device I get this gradle error Error:08:38:07.975 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 08:38:07.975 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 08:38:07.976 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 08:38:07.976 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 08:38:07.976 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution

Android Studio flagging error in SQLite pragma command, <pragma value> expected, got 'ON'

三世轮回 提交于 2019-12-05 20:08:19
问题 I think this is a new error since switching to Android Studio 3.0. I am receiving a lint syntax error: <pragma value> expected, got 'ON' I get this error only on the first of the following two methods: private static void setForeignKeyConstraintsEnabled(@NonNull SQLiteDatabase db) { if (!db.isReadOnly()) { db.execSQL("PRAGMA foreign_keys=ON;"); } } private static void setForeignKeyConstraintsDisabled(@NonNull SQLiteDatabase db) { if (!db.isReadOnly()) { db.execSQL("PRAGMA foreign_keys=OFF;");

Android Studio 3.0 submodule compile failed

有些话、适合烂在心里 提交于 2019-12-05 18:58:39
App level build gradle dependencies devCompile project(path: ':mymodule', configuration: 'devRelease') proCompile project(path: ':mymodule', configuration: 'proRelease') qaCompile project(path: ':mymodule', configuration: 'qaRelease') offlineCompile project(path: ':mymodule', configuration: 'offlineRelease') mentioned publishNonDefault true flavorDimensions "default" I have tried This accepted answer but didn't work. Update: Look at the library gradle flavor that I want to compile. I have the same flavor mentioned in my app's Module. dev { manifestPlaceholders = [facebookId: "SOME_FACEBOOK_ID

Resources ids not updating in Android Studio 3.0

[亡魂溺海] 提交于 2019-12-05 14:45:10
I recently updated to Android Studio 3.0 and noticed that when I for example add any android:id, or create new drawable, or basically any resource, Android Studio does not update it in project until I build application. Every resource I create in xml, in class is marked as red and standard "Cannot resolve symbol ..." is shown. But surprisingly if you try to go to declaration, it correctly goes to the resource. Is there any option for this not to happen? It's very irritating. Edit: It's still occuring sometimes, but I just got used to it. If someone fixed it I will be thankful for your answer.

Android Studio 3.0 Unsigned Apk Not Installing

时光怂恿深爱的人放手 提交于 2019-12-05 12:06:00
问题 After upgrading to android studio 3.0 the debug apk is saying App not istalled. The package appears to be corrupted 回答1: Looks like we can not directly use the apk after running on the device from the build->output->apk folder. After upgrading to android studio 3.0 you need to go to Build -> Build Apk(s) then copy the apk from build -> output -> apk -> debug Like this - 回答2: Fist Click On Build Icon on android studio after that click Build APK(s) then Generate APK the copy Apk. It is working

Android studio failed to build tools after updating to 3.0 from 2.3 stable channel

醉酒当歌 提交于 2019-12-05 07:26:36
问题 I just updated my android studio from 2.3 to 3.0 from stable channel. But I was getting this error Failed to find Build Tools revision 26.0.2 Install Build Tools 26.0.2 and sync project I do tried to install this but still failing to resolve 回答1: Open SDK manager to check installed buildtool revision version: for example, I have version 27.0.3 installed. Then add buildToolsVersion '27.0.3' in build.gradle : 回答2: You can install any version of build tools manually. Please go to Preferences >

Execution failed for task mockableAndroidJar, mockable-android- . jar already exists

谁说我不能喝 提交于 2019-12-05 04:25:32
I am facing issue with Android Studio 3, gradle android plugin 3 with build target 27 and support lib 27.0.0 Error:Execution failed for task ':module:mockableAndroidJar'. > Output file [[...]/build/generated/mockable-android-27.v3.jar] already exists. I have to clean or manually delete all mockable-android jars from the generated folder time to time. So this means instead of getting better build times, I have to clean the project most of the times. Simply cleanup the existing jar before running the task again. Running clean does work, but it's a little intense in my opinion. Instead, make the