android-studio

Transitive Library dependencies are not found in the application

跟風遠走 提交于 2020-01-11 07:34:21
问题 Say I have a library module which contains some 3rd party libraries like OkHttp. When I include this library in my application I was unable to use these 3rd party libraries. I read the following articles Article 1, Article 2 and tried 1. compile project(':library-name') {after importing the .aar file(of library) as a module into myproject} 2. I included the .aar file in libs folder and added following dependencies build.gradle(project level) allprojects { repositories { flatDir { dirs 'libs'

Show my current location in the Google Map

时光总嘲笑我的痴心妄想 提交于 2020-01-11 07:18:21
问题 Finally I succeed to display the map,Now,I want to show my current location, I tried by using these code but it didn't work when I clicked the my location button in the top right corner. AndroidManifest.xml <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Show my current location in the Google Map

蓝咒 提交于 2020-01-11 07:18:08
问题 Finally I succeed to display the map,Now,I want to show my current location, I tried by using these code but it didn't work when I clicked the my location button in the top right corner. AndroidManifest.xml <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Glide - call method after fallback or error when trying load photo

天大地大妈咪最大 提交于 2020-01-11 05:59:05
问题 Glide - call method after fallback or error when trying load photo. Hi! Is there any a way to check if Glide load photo from link or use fallback / error when link isn't valid or photo isn't available? I mean, I want to call a method (load other photo) when Glide doesn't load photo. This is my Glide e.g.: Glide .with(mActivity) .load(news.getPagemap().getCseThumbnail().get(0).getSrc()) .fallback(R.drawable.bg_gradient) .error(R.drawable.bg_gradient) .centerCrop() .crossFade()

Can't import project to android studio

£可爱£侵袭症+ 提交于 2020-01-11 05:18:08
问题 I'm trying to use this library I've added compile 'net.rdrei.android.dirchooser:library:2.0@aar' to dependecies. My top level build file // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.8.+' } } allprojects { repositories { mavenCentral() } } And it gives me error "failed to refresh gradle project" with reference to the project, that I'm

Gradle project refresh failed: Already finished

限于喜欢 提交于 2020-01-11 04:59:05
问题 Background: I've been fighting with Studio/Gradle for a day or so at this point; there were initially multiple PEBKAC errors (namely permissions and resource limits) that have since been resolved. Unfortunately the google-fu has failed me for this current error. The error specifically occurred attempting to complete ./gradlew clean which did not complete successfully; it failed about 30s in. I temporarily 'fixed' the problem by blowing away the offending git repo and cloning it anew. I

Release version of *.apk in Android Studio

我是研究僧i 提交于 2020-01-11 04:24:05
问题 I want to submite an application to Google Market. I found there is only one apk file generated in a project, its path is Project1Project/Project1/build/apk/Project1-debug-unaligned.apk It looks like it's a debug version. Where do I find (if any) a release version of an application or how do I generate it? 回答1: Since Android Studio is based on IntelliJ, that's how to do it in IntelliJ: Build -> Generate Signed APK and provide it with your key and its password. 回答2: You can build an unsigned

Android Studio 3.3 bug

匆匆过客 提交于 2020-01-11 04:13:05
问题 I recently upgraded to Android Studio 3.3 and I've been working on projects using the IDE for the last week. I've noticed that a times the java files are corrupted and do not open correctly. See the image. What might be the issue considering version 3.3 has been released in the stable channel. 来源: https://stackoverflow.com/questions/54423372/android-studio-3-3-bug

Kotlin issue “One type argument expected for class ExpandableRecyclerAdapter”

﹥>﹥吖頭↗ 提交于 2020-01-11 04:10:14
问题 Got problems with RecyclerAdapter ViewHolder abstract class ExpandableRecyclerAdapter<T : ExpandableRecyclerAdapter.ListItem>(private val context: Context) : RecyclerView.Adapter<ExpandableRecyclerAdapter.ViewHolder>() { protected var allItems = ArrayList<T>() ... open inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) open class ListItem(val itemType: Int = 0) } ExpandableRecyclerAdapter in <...> is underlined with error: One type argument expected for class

Android Studio rendering Error

大憨熊 提交于 2020-01-11 03:58:07
问题 So I just tried to render one of my xml views and I got this error: Exception raised during rendering: Binary XML file line #-1: No start tag found! Any ideas? I've included the manifest file below______________________________ manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.adrian.trucktracker"> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name=