android-studio

How to import project files without Gradle files into Android Studio

可紊 提交于 2020-01-15 05:58:06
问题 I want to import a project into my Android Studio. It works well in Eclipse when my friend gave it to me. But I couldn't import it into my Android Studio. And all the tutorial told me that I should add/edit the Gradle files when there is no Gradle files in this project. So what am I going to do without having to download the Eclipse IDE? Many thanks. 回答1: You can export the project from eclipse to a gradle project. Right clicks your project. Clicks the 'export' in the popup menu. Choose

Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String)

我怕爱的太早我们不能终老 提交于 2020-01-15 05:55:29
问题 I'm working on an Android Studio project and today when i opened it up all of a sudden this started happening. Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String) I've already tried to change the gradle versions around but nothing works. Also, I've tried the classic "clean project", "rebuild project" and "invalidate caches and restart" gradle.properties # Project-wide Gradle settings. # IDE (e.g. Android Studio) users:

Gradle can't user JAVA_HOME while debugging from Android Studio

被刻印的时光 ゝ 提交于 2020-01-15 05:13:14
问题 I'm trying to compile a project in android studio and it gives the Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. I've already red that to gather more information i should use: gradlew compileDebug --stacktrace from the main folder, but when i do that i get that error: JAVA_HOME is set toan invalid directory: C:\Program Files (x86)\Java\Jre7\bin\java.exe; Please note that i tried to use a 64 bit version of the jre too in the

Android textview for html from url

旧城冷巷雨未停 提交于 2020-01-15 04:56:06
问题 Ive been trying to get a TextView working to display my HTML from a url but all the examples ive seen use a string e.g String htmltext = "<h2>Title</h2><br><p>Description here</p>"; myTextView.setText(Html.fromHtml(htmltext)); But i want to display from a webpage that i run. If i change htmltext to "www.example.com but that is displayed not the content. Im sure many will say use webview. I have and looks just like a browser. 回答1: First get all the content from web page by supplying URL to

“How to solve ”SSL peer shut down incorrectly" when updating android studio

假如想象 提交于 2020-01-15 03:26:25
问题 I updated my android studio from 2.1.2 to 2.1.3 . But after restart an error occurred with this message. " SSL peer shut down incorrectly". How can i solve it? 回答1: The problem is caused by some kind of incompatibility with HTTPS. For solve this, in the Preferences,go to Appearance & Behavior > System Settings > Android SDK there are a tab called "SDK Update Sites", at the bottom of this section is the option "Force https://... sources to be fetched using http://..." and check the option

Display JSON data on Android using GSON and Volley

扶醉桌前 提交于 2020-01-15 03:21:29
问题 Hello I'm new to android programming and trying to learn it. I followed this tutorial and it's working fine however I don't know how to display the records in the listview. The PostActivity.java file is from the tutorial is below, package com.kylewbanks.gsonvolleytutorial; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.ArrayAdapter; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley

Gradle on Android Studio loading with error

本小妞迷上赌 提交于 2020-01-15 03:12:26
问题 I'm running android studio on Debian distribution(32 bits) and whenever I start android studio I'm facing a problem with gradle,it keeps loading forever and in the gradle window I get a long list of errors which says: ***Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources] Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE

Error in creating AVD in android studio

天大地大妈咪最大 提交于 2020-01-15 01:53:15
问题 I am new to android studio. my problem is when i try to create AVD its showing unknown error. see idea.log for details. I am working on windows8. 回答1: Delete all the files and folder from a directory home//.android/avd It's for Ubuntu. In Windows it's also in the user's folder (.android/avd). 回答2: Before you create the new Virtual Device, Try downloading via SDK Manager the API level you want on the Virtual Device. This should do it. 来源: https://stackoverflow.com/questions/47142959/error-in

Android Studio Build Error - “Failed to resolve: monitor”

╄→尐↘猪︶ㄣ 提交于 2020-01-14 18:50:43
问题 I had a previously running project, where the versions were upgraded to the latest. Now I cannot build the project due to below build error. Failed to resolve: monitor Open File The "Open File" link is to the build.gradle (Module) file. I tried "Invalidate and Restart" which does not help. Searching under "Failed to resolve: monitor" or "Failed to resolve:" did not result in any solutions. I am completely stumped at this point. Module: build.gradle apply plugin: 'com.android.application'

Android Studio Build Error - “Failed to resolve: monitor”

家住魔仙堡 提交于 2020-01-14 18:50:08
问题 I had a previously running project, where the versions were upgraded to the latest. Now I cannot build the project due to below build error. Failed to resolve: monitor Open File The "Open File" link is to the build.gradle (Module) file. I tried "Invalidate and Restart" which does not help. Searching under "Failed to resolve: monitor" or "Failed to resolve:" did not result in any solutions. I am completely stumped at this point. Module: build.gradle apply plugin: 'com.android.application'