what can i do my Android studio show this Gradle model version=5.4.1, NDK version Unknown.So What Cane I do Sir Please Help me.......
I just installed the newest of Android Studio, and I opened my project and started to sync and this error showed up: NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN What's going wrong?
Something similar happened to me.
It is solved almost by magic.
In the files build.gradle, comment the dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
...
}
"Comemnt with block Comment" and "Sync Now".
And then, I replaced the dependencies.
Related
I'm trying to develop a location map for uni. The app itself works on my phone but I can't edit the XML file or preview it
I've already enabled virtualisation and have an i5 processor. I believe the issue lies in the Gradle build but don't know how to fix it.
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
And the error message:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1)
Inspection info: There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
It looks like the media-compat:26 should be updated to a newer version but I can't find the code for it or the library and don't know how to download the library. Any help will be appreciated.
You need to set your compileSdkVersion and targetSdkVersion to 28. Because all your support libraries must match to your compileSdkVersion's root number. And, if you add more support libraries like- support:design or support:recyclerview-v7, you must add the same version (here you used 28.0.0). Otherwise, the app can crash at the runtime for mismatching. The full Google repository for android is here http://maven.google.com.
To know more about gradle dependencies of android, please go to official documentation here. For google play service API configuration, go to this link.
Try change implementation 'com.android.support:appcompat-v7:28.0.0' to:
implementation 'com.android.support:appcompat-v7:26.1.0'
compileSdkVersion 26
targetSdkVersion 26
All libraries must have the same version, in the case it looks like a conflict between com.google.android.gms: play-services-maps: 16.0.0 and implementation 'com.android.support: appcompat-v7:28.0.0'.
If you are using compileSdkVersion 28 try to find the latest version of the libraries in the maven repository.
https://mvnrepository.com/artifact/com.android.support/appcompat-v7/28.0.0
Error:Failed to resolve: com.android.support.constraint:constraint-layout-solver:1.0.2
Install artifact and sync projectOpen FileShow in Project Structure dialog
go to file>settings>Android sdk>sdk Tools>and update your support repository that fixed my problem
I encountered this problem as well. It was perplexing to me because the SDK manager showed both ConstraintLayout and its solver as installed. What I did to solve it was the following:
Open the SDK manager (the Android Studio nav bar button with a downward facing arrow and a little Android head)
Click the "SDK Tools" tab
Uncheck boxes next to "ConstraintLayout for Android" and "Solver for ConstraintLayout"
Click "Apply" and confirm that you want to uninstall those components
When uninstallation is complete, recheck the boxes in step 3
Click "Apply" and confirm that you want to reinstall the components
The next time you refresh your gradle projects, everything should work just fine!
first add google maven repository in module level gradle file(important part)
repositories {
maven {
url 'https://maven.google.com'
}
}
then add this line in dependencies:
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support.constraint:constraint-layout-solver:1.0.2'
I have also faced the same error. I updated my android constraint-layout version to 1.0.1(com.android.support.constraint:constraint-layout:1.0.1) from 1.0.2 and it is working now.
build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
testCompile 'junit:junit:4.12'
}
You need to activate Auto Import Packages and Components to use, so On welcome to Android Studio Popup Window see on the bottom > click configure > preference or setting (on Windows OS) > Find Editor > General > Auto Import > Change Insert Imports on paste to All, and thick checkbox Add unambiguous import on the fly.
And you also need to check installed SDK Platforms on your machine, position still on setting page, find Appearance and Behaviour > System Setting > Android SDK > and you need Pick Android 5.0 (Lollipop) until Android 7.0 (Nougat) the latest one if you prefer > click apply > And you will be asked to download > as all finish you will be find to go.
i need to include this library but i ve got several problems.
project library on github
i tried to follow the instructions on the github project but they did not work for me. I have to include the library in android studio.
i tried to:
1) copy the whole code in my project but i had a lot of conflicts about package, and, once solved, i began to have problems about lacks of functions not defined
2) i tried to use mvn install command, but it did not work, something like 100 errors displayed
3) i tried to open that project with intelliJ and then i tried to export jar file, but intelliJ told that it s an android project
does anyone have any idea about the procedure to include this library?
Thanks a lot in advance
you could give Jitpack a try. At least it worked for me..
See https://jitpack.io/
In essence: add following code to the build.gradle file of your project:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
and add the following line to the dependencies section in the build.gradle file of your app:
`compile 'com.github.gturri:aXMLRPC:master-SNAPSHOT'`
here is what the dependency section looks like for me:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.github.gturri:aXMLRPC:master-SNAPSHOT'
compile 'com.android.support:support-v4:23.4.0'
}
I am working on integrating twitter with my android application, I am using twitter4j library to do this.
I have added the twitter4j library files and put it in a folder libs and added compile dependency in build.gradle inside app folder
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:6.5.+'
compile 'org.twitter4j:twitter4j-core:4.0.2'
}
but I am still not able to use this library
In the Gradle drawer to the right, could you hit the refresh button to see if that helps? Also, the dependencies block that you've pasted above doesn't contain a directive for twitter4j - did you happen to simply miss it out in the question, or is it really missing from the gradle.build file?
Try to add this at "repositories" on your buildscript.
repositories { mavenCentral() }
I'm doing the beginner android course on udacity and the code that they make you put in the MainActivity.java file is full of errors and keeps saying build failed in the console. Here is a link to a screenshot of android studio after failed build
http://postimg.org/image/6etcu6ldz/
I think support library is missing.
Go to your build.gradle (Module:app) and check if support library is in dependencies section.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.+'
}
In addition, you have to install it in SDK Manager.
I hope this answer will help you!