Just install new android studio 3.0 and I cannot find google cloud endpoint in android studio module.
Please how to set up Google Cloud Endpoint with the latest android studio 3.0
In This link the Read.MD That is Provided By GoogleCloudPlatform specifically for endpoints-framework-gradle-plugin has a few modifications due to issue they have found ... It Worked For me as i had the same issue , do the modifications until this line "If you have a particularly complicated buildscript classpath bringing in a lot of dependencies with cryptic error messages like"
clean and build your app and try to run your backend module
here is the link : https://github.com/GoogleCloudPlatform/endpoints-framework-gradle-plugin/blob/master/ANDROID_README.md
you might face an issue of jsr305 or so ...
add configurations.all in your build.gradle (app) as below
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
you might another issue called
Can't start process working directory ............................. exploded-app folder doesn't exist
in order to solve this
modify the backend/backend.iml
Change:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-app" />
To:
<option name="WAR_DIR" value="$MODULE_DIR$/build/exploded-backend" />
if you faced anything let me know i have been going through hit and miss so i faced some issues that might occur to you
note: check the "Android Studio" section specially the "Run" part because it's telling you that you need to run the local development server using the gradle task appengineStart which starts the development server in non-blocking mode
Related
I am trying to get started with Android Studio
I have installed it on several PCs and have used fresh downloads and I keep getting the same issues:
- Cannot resolve symbol 'fun' or Cannot resolve symbol 'view'. I guess this may be all symbols but these at the only ones I am trying to use now
- Objects do not show up on screen when I am trying to design apps
As I said, I have done this on several PCs now and have tried many steps suggested on SO and other forums (such as Cleanup, Invalidate Cache, adding SDKs, etc) and still get the same results.
Each time these have been clean installs with default settings so I think I must be missing a step or something.
Any advice?
Ta
Make sure your project level build.gradle contain the gradle version same as android studio version
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3' //3.1.3 is the android studio version
}
}
If you are getting "Cannot resolve symbol 'fun'", you might be trying to use Kotlin code in an Android Studio setup expecting Java. You could either change your setup to accept Kotlin or switch to using Java in your project.
The other unresolved symbol "view" probably just needs to be added as an import, you can do this by hovering over it and pressing Alt+Enter to automatically add the class to your imports.
I didn’t work full-time with Android in the last couple of years, and now whenever I try to fork someone code on GitHub I get a lot of errors since android tools and Gradle syntax are changing frequently.
I wonder what is the best way to handle these changes, and be able to upgrade other GitHub projects and some of my old projects to work with the latest Android tools. Here are some of the things that I struggle with:
I noticed some of the issues are related to changes in the Gradle syntax. How can I know what Gradle version the build.grade syntax was written with? and then how to upgrade it to the current version (is there a migration guide for Gradle versions?).
Sometimes I get issues related to tools that are not compatible with others, how can I know which version are compatible with which? and whats the easy way to manage that? here are some of these tools:
Gradle
Android Plugin for Gradle
Build Tools
Android Studio
How can I know what Gradle version the build.grade syntax was written with?
If the project contains a gradle/wrapper/gradle-wrapper.properties file, that is the version of Gradle that the developer of the project is using.
is there a migration guide for Gradle versions?
I am not aware of much Gradle syntax that would have changed that would affect Android developers for garden-variety projects. Most of the changes are from the DSL added via the Gradle for Android plugin. You can find the version of the plugin that the project developer was using via the classpath statement in the project's top-level build.gradle file.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
The above snippet is requesting version 1.3.0 of the Gradle for Android plugin.
Migration documentation for the Gradle for Android plugin is minimal. What there is can be found up on http://tools.android.com.
how can I know which version are compatible with which?
Here is Google's statement on the issue, though this has not been updated in a few months.
and whats the easy way to manage that?
If the tools complain, change them to a set that you know is good (e.g., by copying values from a known-working project). If you need something that was introduced in a newer version of the tools, change them to a set that you know is good. Otherwise, don't worry about them.
Im new to testing in android studio, im was trying to setup the gradle for adding dependencies for Junit4.
However, the gradle console informs me "Could not find junit:junit:4.12."
It seems like gradle search the dependency in local folder instead of via internet, please inform how I should setup the gradle file for adding the dependecy for Junit.
You need internet connection -at least first time- to build project first time correctly (i really don't know why) !!!
so, to avoid that you may try download JUnit (required library) from here and add it manually to your application into ~[YourAppFolder]\app\libs
then rebuild your app.
Try commenting out //testCompile 'junit:junit:4.12'.
This will solve the problem if you don't have internet access as you run app after installing Android Studio. As soon as you have internet access, uncomment and run your app, there after everything remains fixed won't be needing internet access again.
I'm sure it works. Not sure why, anyway.
You have in your build.gradle:
buildscript {
repositories {
mavenCentral()
}
}
The above will fetch the plugin com.android.application. That's all it will do.
You should have the below to fetch all your dependencies:
repositories {
mavenCentral()
}
I am a beginner for Android Cloud Endpoints. I am trying to create a backend module in Android Studio 1.0 RC2. Everything seems okay while creating a backend endpoint module (https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints). The gradle builds successfully. But when I wanted to debug locally, I found the problem. It said, "App Engine Gradle configuration not detected on module, maybe you need to Sync Project with Gradle".
I tried to rebuild the whole project, it builds successfully. But the error remains.
This is the screenshot: https://www.dropbox.com/s/tvuv52ldmr0yzvs/Screen%20Shot%202014-11-27%20at%204.21.14%20pm.png?dl=0
Thank a lot.
This was a recently introduced bug that has since been fixed in Android Studio 1.0.
I am not sure if it is the solution. But this is what I did. I created another new project (the problem happened in existing project that I migrated from Android Studio 0.8.9 to 1.0 RC2. I added new module for Google Cloud EndPoints. Initially it was same problem (there is same error in debug config as above, although it can build the whole project successfully.) But after I changed the build.gradle file in backend module to gradle-appengine-plugin:1.9.17 (latest), the new project backend was okay.
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.17'
}
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.17'
compile 'com.google.appengine:appengine-endpoints:1.9.17'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.17'
compile 'javax.servlet:servlet-api:2.5' }
I tried to change the build.gradle file in my migrated projects, but still failed. So, what I did was copy the content from new project
backend.iml
file into my migrated project backend.iml. And it works.
I'm new to Android Studio and i want to implement Urban Airship in one of my projects. I followed the example on their website with the .aar file and I ended up getting this error.
Error: [/Users/AndroidstudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.urbanairship/urbanairship-lib/5.1.0/AndroidManifest.xml:8]
Invalid instruction 'overrideLibrary', valid instructions are : REMOVE,REPLACE,STRICT
Correct me if I'm wrong but doesn't this mean that they have issues in their manifest file? Or am I completely out in the blue? If so, do anyone have a good example on how to implement it?
The Urban Airship SDK builds against Google Play Services that requires Android API 9, while Urban Airship is compatible with 6+. That is why we need the override library version. What android gradle plugin version are you using? You need to use 13.3 or greater. See http://tools.android.com/tech-docs/new-build-system.
In the projects build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.+'
}
}
I just had the same problem, and was able to fix it and build my project:
The offending line is line 8 of the AndroidManifest.xml
I just removed this line and changed some SDK versions.
You can open the file urbanairship-lib-5.1.0.aar using WinRar.
Navigate to the Manifest. Open it and edit within your favourite text editor.
Save and close the manifest. WinRar asks if you want to update the archive. Choose Yes!
According to this page, overrideLibrary is used for when you have minSDK version in a library > minSDK version in your project. So it allows a different version to be compiled instead, without errors.
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-tools:overrideLibrary-marker
Remove, replace etc do something a bit different (also described on that page - scroll up).
Then in my projects build.gradle file I changed the version numbers to match my project:
From this
compile 'com.android.support:support-v4:21.+'
To this
compile 'com.android.support:support-v4:19.+'
Would be good to know what's the outcome of the OP's support ticket. Please keep us posted!
I ran into this issue as well evaluating the 5.1.0 version of the Urban Airship SDK. I am using Android Studio Beta 0.8.14. I contacted Urban Airship support and they told me to increment the version of gradle to 0.13.3. Android Studio 0.8.14 is defaulting to 0.13.2. After changing the version of gradle to 0.13.3 in the project build.gradle file I was able to successfully compile and import the new SDK.