Compiling a project through command line - android

I have a android project which I build through android studio and it worked fine. Then I took a new system and I am trying to build it through command line with this command :
./gradlew assembleDebug
which is giving me error this:
could not find com.android.support:support-v4:22.1.1
How to resolve this.

Related

I am learning flutter and the project is giving 'Gradle task assembleDebug failed with exit code 1'

I am learning flutter and the project is giving 'Gradle task assembleDebug failed with exit code 1'
It is just giving the error just in emulator and working fine in windows and browser. and this is the error I am getting while debugging in vs code
Can anyone please help me with this
I searched everywhere but didn't find anything to solve this issue
First of all run:
C:\src\flutter>flutter doctor
And make sure that there are no errors.
Secondly, make:
C:\src\flutter>flutter create myproj
And follow the instructions.
The correct output should be:
C:\Users\hp\Projects\test>flutter create myproj
Creating project myproj...
Running "flutter pub get" in myproj... 2.859ms
Wrote 127 files.
All done!
In order to run your application, type:
$ cd myproj
$ flutter run
Your application code is in myproj\lib\main.dart.

React Native Error when running React-Native run-android

I get this strange error in VScode when I try to execute the command React-native run-android in the terminal.
Also ran react-native doctor and all green checkmarks for Node,yarn, android_home, and android sdk 0 errors
Not sure how to fix these issues as I have tried all suggestions in previous threads. Anyone have this issue that could assist? This is a windows machine.
Error Image
1.first Gradle needed to connect to the internet.
2.cd android
./gradlew clean
./gradlew wrapper
./gradlew -v // to download the new version
3.project app-level build.gradle file:
update version this
com.google.firebase:firebase-analytics
and this
com.google.gms:google-services

gradlew commands showing no result

I am trying to run following commands on Terminal window of Android Studio, but nothing is coming in result:
ms-macbook-3868:ProjectName my_name$ ./gradlew install
ms-macbook-3868:ProjectName my_name$ ./gradlew bintrayUpload
ms-macbook-3868:ProjectName my_name$
Is this issue with Android Studio?
Please help.

Could not find method include() for arguments [:app] on root project Android Studio

I am trying to import an android project to Android studio,after importing and then clicking on the green run button :
FAILURE: Build failed with an exception.
Where:
Build file
'/home/myusername/prjcts/nomadx/settings.gradle' line: 1
What went wrong:
A problem occurred evaluating root project 'nomadx'.
Could not find method include() for arguments [:app] on root project 'nomadx'.
The content of the file settings.gradle
include ':app'
I solved the problem ; for those who have the same issue : You should build the gradle with the Terminal/console not with Android studio :
./gradlew assembleRelease
After getting this error on first setup:
capacitor.settings.gradle' as it does not exist
..I used two commands from that page: npx cap sync android and npm install --save #capacitor/core #capacitor/cli. I'm not sure which one fixed that error, but it gave me the one on this page. I didnt want to build Gradle again when Android Studio should have it, so I restarted it and it started downloading a bunch of Gradle stuff to: /home/user/.gradle. It then prompted me to upgrade Gradle.
I then got a similar error to the OP Could not find method include() for arguments [:app] on root project 'android' of type org.gradle.api.Project..
So finally running the above ./gradlew assembleRelease, this error was shown:
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. All licenses can be accepted using the sdkmanager command line tool: sdkmanager.bat --licenses
I installed SDK sudo snap install android-sdk but didnt have it. Installed with sudo apt install sdkmanager and then sudo sdkmanager --licences (y) to accept.. and got the same error. Found sdkmanager under Tools in AStudio. Tried to update there, but failed. Opened with sudo android-studio, had to select /home/user/.config/Google/AndroidStudioX.Y

Cordova Build Failed: Error starting modern compiler

HI i am trying to generate cordova 3.5.1.jar .but getting the below error in my command prompt window.Can any one help to sp
BUILD FAILED
E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\too
ls\ant\build.xml:720: The following error occurred while executing
this line:
E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:734: Error starting modern compiler
Total time: 5 seconds
You probably have messed up with your Java installation by accident.
If you want to troubleshoot Cordova build process you could run command below:
cd <path/to/project>
ant -v -f ./platforms/android/build.xml debug
assuming that you are using cordova tool for the running build.

Categories

Resources