I'm develeoping react-native app on a computer without internet connection(I can't connect it to the internet),
I have configure the local repository and the android plugin according to android studio guide here
and also linked the gradle localy.
All the configures worked fine but the project is still not compiled, I get unresolved dependencies of the react native modules(example here) that I used.
I'm trying to solve this issue for two weeks and failed.
I didn't find any solution for this yet
The android studio version is 3.5.2 and the gradle version is 5.4.1
Any idea? Any help would be appreciated
Well, working offline with gradle will prove a little hard unless you build the project once when you have internet.
The problem is that gradle needs to resolve the dependencies and for this it's not only looking in node_modules, but also at different online repositories.
If you don't have internet - gradle isn't able to fetch the required packages and you get a build error.
In your case you've configured android studio to use offline versions of gradle and maven, but what your build can't find is soloader, yoga etc - those are libraries that are not available in the offline maven build you downloaded. As far as I can see from the content of that build it only contains the android dependencies.
You'll need to get the soloaded, yoga etc and provide those to your build for offline use. I guess that the easiest thing would be to build the project once when online... Afterwards gradle should reuse the cached packages.
Related
I am using Android Studio 4.1.1 to complete a Beginner's Android course that was last updated in 2015/2016. I don't know how to use Gradle and GitHub as I am new to this.
This is the link to the GitHub repository of the project:
https://github.com/udacity/ud839_Miwok/tree/Starter-code
I downloaded and extracted the zip file and imported the project, and have even tried importing it directly from the Version Control option. However, whenever I try to sync the project, the following error appears and the Gradle sync fails.
Incremental Java compilation is an incubating feature.
It asked me to install hundreds of files and plugins which I did but nothing works. Please help.
I know this is badly written, but there are so many different errors everytime I try to run it, I am overwhelmed.
It's been now two days I'm fighting with this issue.
I'm trying to build a cordova project that built marvelously like 1 month ago.
In between these time periods I had to change my PC so I installed again Java, Android Studio and Cordova, setting it up as usual.
I installed Google Repository (v58) as well as Android Support Repository (v47.0.0) in the SDKManager.
They appears to be the latest since I tried to uninstall and reinstall them twice.
I didn't change my project's configuration since I took a backup of it when it was working to start again.
When I run cordova build android, I got this error:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.2.
Searched in the following locations:
file:/C:/Users/Pierrick/AppData/Local/Android1/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.pom
file:/C:/Users/Pierrick/AppData/Local/Android1/extras/android/m2repository/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
file:/C:/Users/Pierrick/Desktop/hAz4rd0uS-uphair-1af95815ef72/hAz4rd0uS-uphair-1af95815ef72/platforms/android/sdk-manager/com/android/support/appcompat-v7/27.0.2/appcompat-v7-27.0.2.jar
These files are needed by plugins cordova-plugin-mapbox (v1.2.3) and cordova-plugin-facebook4 (v1.9.1). Obviously, I checked the "extras" folder in my Android SDK directory, and the last version of Android support I got is 26.0.0-alpha1.
How can I manage to download the requested files in the good location ?
Is it supposed to be done automatically ?
I really don't see what I am missing here, some help would really be appreciated.
I tried to:
-Reinstall cordova-android by cordova platform rm android and cordova platform add android#6.2.3;
-Delete gradle's android support's cache and metadatas as stated here;
-Reinstall Google repository and Android Support repository twice from Android Studio SDK Manager as stated here.
This is drivin' me nuts.
I just cam accross my problem and since I didn't see doublons of this thread I'm posting the answer here.
As stated in this thread the issue is caused by the facebook sdk. If you run in cordova CLI you simply have to modify the platforms/android/project.properties file.
Change this line:
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.+
into this line:
cordova.system.library.1=com.facebook.android:facebook-android-sdk:4.26.0
As stated in the relative thread, this is a hack.
[It is an image which is showing errors that I want to solve
I am using android 2.3.3 I have changed many setups but some constant problems are apearing
Gradle project sync failed.
Rendor errors
install repository and sync project.
I do a lot search and found some ways I replace gradle folder with new version of gradle but failed to solve this.As i installed repository but error is still there.
Why all setups of android are showing same problem?
Remove all previous installation.
Install java JDK 8.
Install jre.
Download latest Android studio (https://developer.android.com/studio/archive.html)
Follow these steps. (https://developer.android.com/studio/install.html)
Can you specify your system configurations?
I have updated SDK and I am using Android studio 2.0(preview). So I think all things are enough updated. For me and for my newly created projects all things work fine. But When Ever I download the code from github I always gets error of gradle versions.
So It is kind of annoying. Well I admire a lot of things are already fixed by gradle while importing that github project . But once the gradle version error occur its some times gets hard to know the exact reason. And honestly I know things about gradle quite enough , but I always get it solved by hit and trial method. So I have many confusions which I am posting below as a questions
How to know what is new gradle version is going on.
How to know which things are now forbidden in the new version of gradle
How to know which support dependencies will work with new gradle version
How to know which version of build tools will perfectly match to gradle.
I think there are many stupid things in these question and I google these questions, but end up with deciding to ask you guys as you guys can clear me formally and casually.
please answer my question if you know this thing deeply.
Android Gradle Build systems are software tools designed to automate
the process of program compilation .
How to know what is new gradle version is going on.
The Android build system uses the Android Plugin for Gradle to support
building Android applications with the Gradle build toolkit. The
plugin runs independent of Android Studio so the plugin and the Gradle
build system can be updated independently of Android Studio.
You can Mouse Hover On classpath for checking latest Version .
How to know which things are now forbidden in the new version of gradle
You should check Android Plugin for Gradle Release Notes
For classpath 'com.android.tools.build:gradle:1.3.1'
Fixed the ZipAlign task to properly consume the output of the
previous task when using a customized filename.
Fixed Renderscript packaging with the NDK.
Maintained support for the createDebugCoverageReport build task.
Fixed support for customized use of the archiveBaseName property in
the build.gradle build> file.
Fixed the Invalid ResourceType lint warning caused by parameter
method annotation lookup when running lint outside of Android
Studio.
Now For your 3rd and 4th questions you should check manual testing .
I just started an android project for school, and I have to edit an android application that was built by previous students. I was given source files and apk but no gradle.
I imported into Android Studio and tried to run the build when I saw that I couldn't. I have looked up documentation online for the past 4 days and have so far come up with nothing other than downloading the gradle-2.7 files and running:
build gradle
in my computers shell.
Is there an easy way to build a gradle? Perhaps some tools or such? Or will I have to go through the files and write all the gradles myself?
Android Studio uses a Gradle wrapper to fully integrate the Android plugin for Gradle. You can build your Android apps from within Android Studio and from the command line on your machine or on machines where Android Studio is not installed.
Android studio comes bundled with gradle and in the screenshot I can see gradel folder, gradlew and gradlew.bat and build.gradle files. So (hopefully) all you need to take care is build.gradle files.
I would strongly suggest you to go through link
If you have time go through this course