android-studio

How to fix 'Cleartext HTTP traffic to x not permitted'

…衆ロ難τιáo~ 提交于 2020-03-03 03:43:42
问题 I'm trying to make a post request to an http server, but when I try to get an input stream I get the error java.io.IOException: Cleartext HTTP traffic to x not permitted I've already tried putting android:usesCleartextTraffic="true" in my manifest, as well as making a network security config and setting the android:targetSandboxVersion to 1 app/src/main/res/xml/network_security_config.xml <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config cleartextTrafficPermitted

How to fix 'Cleartext HTTP traffic to x not permitted'

谁说我不能喝 提交于 2020-03-03 03:43:06
问题 I'm trying to make a post request to an http server, but when I try to get an input stream I get the error java.io.IOException: Cleartext HTTP traffic to x not permitted I've already tried putting android:usesCleartextTraffic="true" in my manifest, as well as making a network security config and setting the android:targetSandboxVersion to 1 app/src/main/res/xml/network_security_config.xml <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config cleartextTrafficPermitted

Multiple Android Application Modules Under One Project

≡放荡痞女 提交于 2020-03-01 19:38:04
问题 I have two 'android application modules' in one project and they create independent apks. But I want to combine these two modules into one hence creating dependencies between the modules so that one apk can be generated and one 'android application module' can invoke activities from another 'android application modules'. Most of the examples suggests me to convert one 'android application module' into a 'library module' but I don't want to do that. Document here suggests that there can exist

Android Studio Layout Preview Default Theme

爷,独闯天下 提交于 2020-03-01 04:30:34
问题 Maybe this is well known option in Android Studio but I couldn't find it and Google has not helped me with this :( Every time I open a layout preview in Android Studio it's applying Material.Light theme to every layout in my project and I need manually apply my own theme to see how it will look like in a real app. Does somebody know how to change default Material.Light theme to be my custom theme when previewing layout with Layout Previewer in Android Studio so I don't need to apply it

Android Studio Layout Preview Default Theme

≯℡__Kan透↙ 提交于 2020-03-01 04:28:03
问题 Maybe this is well known option in Android Studio but I couldn't find it and Google has not helped me with this :( Every time I open a layout preview in Android Studio it's applying Material.Light theme to every layout in my project and I need manually apply my own theme to see how it will look like in a real app. Does somebody know how to change default Material.Light theme to be my custom theme when previewing layout with Layout Previewer in Android Studio so I don't need to apply it

ERROR: Could not find method viewBinding() for arguments

隐身守侯 提交于 2020-02-29 20:09:22
问题 I am trying to implement ViewBinding on Android Studio as described in the documentation. But I get following error: ERROR: Could not find method viewBinding() for arguments [build_86jkemkg0wj9ybuijdbbuahly$_run_closure1$_closure5@2714f9c5] on object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension. I have the latest version of Android Studio for Linux. Why I am getting an error? 回答1: Help->About says Android Studio 3.5 View binding is a part of Android Studio 3.6. Right

'(' , ')', <column constraint> or comma expected, got 'TEXT' SQLite database error in android studio

╄→尐↘猪︶ㄣ 提交于 2020-02-29 05:49:19
问题 I'm developing an Android app in Android studio and whilst creating my SQLite database. However I've run into an error with my code, I've looked around at other questions and answer and my code doesn't look like it should be presenting the error in comparison to the answers on questions. I've added my database and entity class below but haven't created a DBhandler class as the database isn't yet working. any help would be appericated Database class: package com.example.ajhillie.btc_ucs_ma

R8 throws NullPointerException from within AndroidStudio, but not from commandline via gradlew

蓝咒 提交于 2020-02-28 15:40:49
问题 Problem When I click on the debug icon in Android Studio, I get this NullPointerException from R8. Executing tasks: [:app:assembleDebug] in project /Users/gary/Developer/Foo/Foo-Android > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:checkDebugManifest UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:mainApkListPersistenceDebug > Task :app

Location menu in extended controls of Android Studio virtual device

你说的曾经没有我的故事 提交于 2020-02-28 14:00:13
问题 I need to import a .gpx file to my virtual device (something I'm attempting for the first time today), but I'm having a problem I can't find any reference to anywhere else. I'm either having a moment and missing something that should be obvious or there's an issue with the specific build I have that's causing an issue. I have Android Studio 3.5.3 installed and I've tried multiple different virtual devices. All references to the menu page referenced in my title that I can find online look like

gradle > Task :app:externalNativeBuildDebug FAILED android_gradle_build.json (No such file or directory)

最后都变了- 提交于 2020-02-28 13:35:07
问题 I am trying to build an android project from the command line using ./gradlew app:assembleDebug However when I build the task fails with: > Task :app:externalNativeBuildDebug FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:externalNativeBuildDebug'. > java.io.FileNotFoundException: /Users/hcwiley/MyProject/app/.externalNativeBuild/cmake/debug/arm64-v8a/android_gradle_build.json (No such file or directory) If I run Sync Project with Gradle