I am working behind a strict proxy and struggling with identification of URLs which need to be accessible for android developement.
I know for SDK updates https://dl-ssl.google.com/ should be accessible.
I need answer to following queries:
What are the URLs for resolving dependencies using gradle also for updating gradle itself?
Are there any additional urls apart from sdk update and gradel dependencies which need to be accssible?
After a quick search,I also found below urls-
http://download.gradle.com
http://services.gradle.com
https://repo1.maven.org/maven2/
https://jcenter.bintray.com/
http://repo.jfrog.org
May be these will work.
This link provides with requirement for usage of gradle in android studio. with this following are answers to queries:
Following are the urls need to be accessible for basic gradle functionality:
https://repo1.maven.org/maven2/
https://jcenter.bintray.com/
Apart from these any URL required for access of custom libraries hosted on other then default location.
Getting exceptional access from network admin team for said URLs will solve the problem
if your'e running gradle behind a proxy. try adding the proxy settings to your gradle.properties file e.g.
systemProp.http.proxyUser=myusername
systemProp.http.proxyPort=yourport
systemProp.http.proxyPassword=proxypasswordhere
systemProp.http.proxyHost=proxy url/ip here
Related
Hey so I have recently started developing an app using flutter and I have already coma across a few issues. I'll quickly resume my situation :
My app uses firebase auth and I uses the android studio refactor feature for androidX.
This managed to get me a working application with a login form but no way to fill in the login form because the android API 28 has a bug in that it does not show the keyboard after you higlight the textinput. But for fire auth you need the API level 28 ...
I managed to get around this by using the flutter channel dev.
Now so far everything works login in and registering users with the firebase auth.
Next I want to implement the facebook login and this is where I encountered even more trouble.
I used the https://github.com/roughike/flutter_facebook_login package and followed all the steps and went through the whole configuration on the firebase page and the facebook developer page.
Add the res/strings.xml
Add permission the manifest
Add and the two under the application key in the android manifest
Add "implementation 'com.facebook.android:facebook-login:4.40.0'" under the app level gradle dependencies
Checked the jcenter() in the project level grable repositories
The actual dart code seems fine and the project builds and runs correctly on IOS
I do not get any errors even running flutter in verbose mode. The logcat is also completly empty.
I am at a complete loss it's really starting to feel like flutter is not really stable after all.
Any help would be greatly appreciated.
Thanks
EDIT: This issue seems to be androidX related and should be fixed as soon as this pull request :
https://github.com/roughike/flutter_facebook_login/pull/87/commits/70dec4403710eb4c52a98e035a0a5e7d7f551d76
is merged.
Ok I got it working by copying the repository locally and adding the changes in the aforementioned pull request.
Then in my pubspec file I used the path: key to set the dependency to my local file instead of the official git.
you can also use
git:
url: (url to your fork with the fixes in place)
I had to run flutter clean before rebuilding the app and now everything works.
EDIT A comment has just been added on the pull request thread :
As we are not sure when this will be merged, you can adjust your pubspec.yaml in the meantime:
dependency_overrides:
flutter_facebook_login:
git:
url: https://github.com/yudaprama/flutter_facebook_login
ref: android-x
I can't build my android project due to this error. Gradle failed to GET https://www.jitpack.io/com/github/Raizlabs/DBFlow/dbflow/3.1.1/dbflow-3.1.1.pom . Strange enough I am able to view the pom file behind this URL in my browser. What might be the problem here?
My gradle.properties look like this:
systemProp.http.proxyHost=myproxy.local
systemProp.http.proxyPort=3210
systemProp.https.proxyHost=myproxy.local
systemProp.https.proxyPort=3210
systemProp.http.proxyUser=usr
systemProp.http.proxyPassword=pwd
When I remove the proxyUser/Password I get an 407 Proxy Authentication Required.
For me this worked
1. Invalidate caches/restart
2. Sync project with gradle files
Check the local 'gradle.properties'. My problem was on there. Somehow there was some proxy informations and they was wrong. I deleted it and problem solved.
Your proxy needs authentication and the authentication you supply is invalid or your proxy does not allow to request that URL with the authentication details you supply.
You've only provided user/password for systemProp.http. You likely need to provide the same for systemProp.https
See accessing the web via proxy
You need to reset android studio because we cannot get the sever response due to proxy matters.
Close Android Studio.
Please Go to C://Users/Username/.
Then delete .gradle file and .Android Studio File.
After Open Android Studio and set settings.
I solved this problem using above steps.
check gradle offline mode under settings and check local gradle then specify the path of you gradle.zip file its under
Upgrading to Android X can fix the Forbidden! response problem.
Open your project on Android Studio
Top menu > Refactor > Migrate to AndroidX
Don't forget backup your entire project before migrating.
Late answer, but useful, i suppose. I realised that it is not allowed to read jitpack artifacts from a private repository without having a paid subscription:
https://jitpack.io/private
So that's might be a cause for 403 error.
You have an option either upgrade or make the repository public
Subscription must be bought for the repository's owner account.
I have a working Android app using:
Google Maps (play-services-maps)
Google Location, Activity Recognition, and Places (play-services-location)
Google Analytics (play-services-analytics)
Google Mobile Ads (play-services-ads)
I'm currently using version 8.3.0, everything works fine. I'd like to upgrade to the last version, 9.2.0. When I change the number in the gradle files, Android Studio is unable to find the APIs packages & classes (saying "package XXX does not exist" and "Cannot find symbol class YYY").
I currently have no google-services.json file, do I need it now? I tried without success, probably because I have several modules / submodules, and I don't know where the json file is needed or not.
The problem is that I need a package name to create the JSON file, and I have some library modules, without package name, using Google APIs.
If needed, here is the project structure:
Maybe you did something wrong while upgrading your project. Make sure you follow the correct steps in upgrading. I suggest you to retry the process of upgrading, but make sure you do the correct way. Like in configuring your build and setting up Google play service.
For your question about google-services.json, Google-services.json contains developer credentials and configuration settings, which is needed to verify while connecting with GoogleApiClient. Though your service is working fine without it. But it will only work with your test device, as it is detecting your developer account. And after you releae your app in public, it will not work without the json file. So you need it and don't delete.
sources: What does google-services.json really do?
So, I finally got it: I was using the AutocompletePrediction.getDescription() method, which has simply been removed (and replaced by AutocompletePrediction.getDescription .getFullText()). That call made gradle stops building -_- .
Thanks Google for removing stuff without deprecating it for a while (though the docs says that the method is deprecated: https://developers.google.com/places/android-api/releases)...
I can also confirm that in my case, the google-service.json file is NOT required.
I'm struggling for some days to do that. Without success.
I've found two ways that I think reasonably to follow:
1: Plugin cordova-sftp-plugin.
I see that it is writted to deal with 'secure ftp', but why wouldn't work in an ordinary non secure ftp? Nothing was metioned about it.
I've tried so, applying the 'Use Example' from the official page, the code fells in the success callback function, but when I list the local directory, nothing was changed! It gives me no clue about what goes wrong! In true, the software does not detect nothing wrong.
Before the previous steps, I did not forget to precautionally install and enable the 'cordova-plugin-file', 'cordova-plugin-file-transfer' and 'cordova-plugin-network-information' and to add the <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> in the AndroidManifest.xml. Tryied to save files in cordova.file.externalRootDirectory and cordova.file.externalRootDirectory + "/Downloads/. Nothing worked.
2. The macdonst FtpClient plugin.
Searching for my issue, one of the first pages that appears is How to ftp a file over to a server from PhoneGap/webapp?, and beyond some further search I've found another one in a relatively old post mentioned the successful use this plugin in a Cordova application. So I can consider this plugin as a stable choice.
The problem with this method comes earlier: I coundn't even build the application after a manual installation proccess. May it is a problem in the manual installation proccess.
The official plugin documentation teachs to install it in a PhoneGap application, and not a Cordova. The steps was not replicable to Cordova, due to some differences in paths and configuration, and some others links also supports the plugin installation solely in Phonegap, not Cordova.
I also tryied follow the steps in the http://antonylees.blogspot.com.br/2015/01/how-to-manually-add-cordova-plugins-to.html and Manually install Device plugin (and others) into cordova 3.0 to manually add the plugin. The steps in the first link also was not well replicable, and although the second one are more straitfoward, also does not solved the issue.
Building it gives me a java error compilation. The first error output (what uses to cause all the following errors are):
E:\danilo\Documentos\projetos_cordova\ftpDownload3\platforms\android\src\com\phonegap\plugins\ftpclient\FtpClient.java:27:
error: package org.apache.cordova.api does not exist
import org.apache.cordova.api.CallbackContext;
Very strange. May I have to search for the org.apache.cordova.api jar file and put in the lib folder? Also, I did not forget to put the commons-net-2.2.jar in the project libs folder.
Can anyone have some suggestion to succeed this? I just want to download a file through ftp protocol and save locally and so, if there's an alternative method to succeed, it will be appreciated too.
Thanks in advance.
Why does Google have this note? [ref]
What is the harm in adding reference to the library in the SDK directory? I have done it and my app worked just fine.
I think maybe it could will change name in some sdk updates, so if you referece to your copy nothing can go wrong.
instead reference it on gradle to avoid this problem (Gradle work for us to avoid dependecy problem :)).
Yes, you can use it directly from there. I used to do it too till i realized what the problem could be.
If you are making no changes to the library it should work fine. But if you plan to add some build files or configuration etc you should copy it to the project. (I had some for my ant builds) If you dont have any, at the time of updating the library from SDK manager you lose everything you changed or configured. Apparently it deletes all unidentified or manually added stuff when updating the library.
With Android studio it is much simpler and you just add a dependency with required version to your build.gradle file.