Android studio is not showing Activity_main.xml. Compiling produces the following output:
Gradle project sync failed,
Unknown host 'repo.maven.apache.org
you may need to adjust the proxy settings in Gradle.
Ensure you're connected to the internet
Disable gradle offline mode
Check your firewall and proxy settings
Related
After upgrading to Bumblebee, some of my projects now show this:
The specified Gradle installation directory '/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1' does not exist.
How can I solved this issue? I have tried some old solutions (eg Android Studio - Gradle sync error on gradle-diagnostics-X.X.X.jar) and does not seem to work. Also tried clear cache and restart.
Go to Android Studio Preferences → Build, Execute, Deployment → Build Tools → Gradle.
Change the "Use Gradle from:" option from "Specified location" to your properties file.
(Screenshot provided by Mike)
Then, click "Try Again".
After Android Studio(3.4 and 3.2) installation I have tried to create a project. I am getting this error:
Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.31/kotlin-stdlib-jdk8-1.3.31.pom'. Received status code 407 from server: blank
Enable Gradle 'offline mode' and sync project
I have set proxy settings in File->settings and gradle properties and Connection successful. I have tried many things through settings still Not working.
Is it compulsory that Android studio must be connected to the internet to use gradle for debugging an android project and creating an apk file
You can run in offline mode. But any update to build.gradle will need internet connection to sync the project
When I run my program with the emulator on Android Studio I get an error as follows
Local SDK Path Not Set
When i checked this in my project structure my SDK path is
C:\Android\sdk
and this is the same in my SDK Manager. I'm new to Android Studio and am curious of why my emulator loads, but does not run my program.Any help in this regard will be appreciated
In the menu Run > Edit Configurations if you have the deployment target as "Emulator" with no preferred device selected you may run into this issue. Instead, choose deployment target as "Open Select Deployment Target Dialog". This will let you select from any installed emulator or a device connected by USB. Make sure to hit "Apply" before closing the Edit Configurations menu.
Edit Configurations with Emulator but no Emulator
Edit Configurations with Open Select Deployment Target Dialog
I ran in to the same problem after synchronizing gradle. All I had to do was turn the emulator off and on again to fix the problem.
Make sure you are connected to the internet (so Android Studio and Gradle can actually complete their tasks) and perform a Gradle sync ('Sync Project with Gradle Files').
If you still have the error after gradle sync, then set your ANDROID_HOME environment variable.
On macOS, once you know the location of the android SDK, open a terminal window and enter the following:
export ANDROID_HOME={YOUR_PATH}
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.bash_profile
when I try to build my App , Android studio always show this error,Unable to save settings: Failed to save settings. Please restart Android Studio , and i am sure that i never change any settings in AS .
This makes build process stop a long time,before build can proceed.
Give me sone advices, thanks.
Android studio 1.5, mac os x el capiton
snapshot here