I am using android studio for app development and i am using it from its 1st release, i keep updating it whenever a patch is available.Recently I updated my android studio to latest version , that is 0.2.9 and now i am facing problem while creating new project.
every time i am getting this exception msg box
The following dependencies were not resolvable. See your build.gradle file for details.
- com.android.support:appcompat-v7:18.0.0
and i am clueless about what went wrong !!
p.s : previous projects are working fine
seeking suggestions on it :)
Make sure you download the Android Support Repository under Extras using the SDK Manager
The in your project module look for the second build.gradle file uncomment the dependencies section that is pointed in your case, the file provides some instruction on what you have to do.
With that in place save, build and test, happy coding!
Related
Hello I am new to flutter and i want to do native function calls using flutter, i wrote an sample native code app and it is working as expected. Now i want to use some packages on my android code, which is platform specific.
I have added my dependcies in my build.gradle file and it the gradle build is success,
But i cannot use the package there,
say for example: i have added the dependency for the com.squareup.okhttp3:okhttp:3.4.2 and gradle build is success and now icannot access their methods and other stuffs. Please let me know to what to do with it. Thanks in advance.enter image description here
Finally it worked, i opened the android project as an new android project in android studio which resolved the issue.
Error MSB4044: The "ResolveLibraryProjectImports" task was not given a value for the required parameter "DesignTimeBuild"- From visual studio for Mac
Tried cleaning the project and and removed all the obj files.
Any help appreciated.
Thank you
Clean your Project and Build individual Components like right click on your common/Droid/iOs individually and click build,instead of doing build all,see if this works
1.) Check in your Build - Configuration manager that iOS project is not selected while Droid project is being build.
Or
2.) Check the packages version that you have installed are compatible, i.e Xamarin.Forms package version should be compatible with Droid other packages and version should be same for your PCL project.
Hope this may solve your issue.
when I replaced the file with another in the Android.coomon.targets, this error was fixed and the project got build successfully.
Basic functionality (eg. editing,debugging)will not work properly. Error:Unexpected lock protocol found in lock file. Expected 3, found 0
I recently updated my android studio on stable channel and since then all my old project files have this issue when i open them
on the gradle console -> Messages
Error:Unexpeced lock protocol found in lock file . Expected 3,found 0.
Please help me resolve this issue
Finally found the fix :
You just need to go to File -> Project Structure or jus press Ctrl+Alt+Shift+S
and then on the top left click Project Make sure that your Android Plugin Version is the same as you Android Studio Version .. This should fix it
additionally
You can also create a new Project and check under Project view initially you'll be in Android .. change the view to ... Project - > gradle (Note .. not .gradle only gradle ) ->wrapper ->gradle-wrapper properties.. open this file and you can see the last line ie ..
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
make sure you have the same gradle version in your old files as well
Check out this Youtube Video i made regarding this issue
https://youtu.be/-Ngn4YvbKtw
I am trying to integrate new relic SDK into my app, and the problem is that the code is old and wasn't ported to gradle and we don't have time to port it. So when we try to add the new relic sdk into the project structure as a library is not working and it's throwing me an error that I can't get any feedback, the error is the following.
Failed to detect New Relic instrumentation. Something likely went wrong during your build process and you should contact support#newrelic.com.
NewRelic provides a video on their page for proper import in ADT/Eclipse. It is available on this page: https://docs.newrelic.com/docs/mobile-apps/android-installation-and-configuration
Generally, after adding a .jar to your library directory, you must set your build path correctly. Right click on your project, select Build Path -> Configure Build Path and make sure that the .jar appears in the Libraries tab and that it is checked in the Order and Export tab.
Anyways, regarding about the problem of not been able to build in android studio is fixed, but also I were able to import my code to eclipse and make it run and after that I make it work also in android studio without gradle. I have submitted a ticket to new relic just in case they are willing to create a new tutorial for people, like me, that are not using gradle an make it work in android studio.
This is the important line:
-javaagent:/path/to/newrelic-android-3.330.0/lib/class.rewriter.jar
you have to add this into your compilation parameters, and the only way to do it is through the preference of the android studio, instead of your project preference.
Try to find a way to add this command only for when we are building this project and not other ones. Let see.
I've downloaded and installed Android Studio with all the required dependencies such as JDK 1.7 and Gradle 1.6. I am able to import the projects and modules quite comfortably in Studio, but when I try to create a new project I am getting errors like this:
Since this is the new born IDE I couldn't find much details on this, except for this and this. Any help would be greatly appreciated.
After to pass much time trying to resolve this, i reached a solution :
Are you using "Windows Version" of AS ?
Please follow these steps :
1 - Install the last version of JDK with respective JAVA_HOME variable.
2 - Download and Install Gradle1.6 with respective GRADLE_HOME variable,
http://www.gradle.org/docs/current/userguide/userguide_single.html#installation.
2 - Delete these folders:
C:\Users\youruser\.AndroidStudioPreview
C:\Users\youruser\.android
C:\Users\youruser\.gradle
3 - Reopen Android Studio
Now probably it will works
There are a lot of bugs in "Early Access Preview"....
The error dialog mentions Gradle 1.4
Android Studio requires the Gradle plugin 0.4 which requires Gradle 1.6
I tried the environment variable and folder location stuff suggested, also made sure I had the latest version of Gradle, but that made no improvement. Then I ran Android Studio using an admin account, at which point all the errors disappeared. If you are able to, I suggest you do the same.
This was on a Windows 7 box.
For me, this problem was caused by my local.properties file showing a different path to the Android SDK. I do development on both Mac OS X and Windows and the properties file was showing my Mac OS X SDK path. Turns out, this file shouldnt even be checked into source control. Ooops!
The fix for me was on the Known Issues page here: http://tools.android.com/knownissues
I changed
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
to:
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
Reopened Android Studio and voila!
The best solution I found is to check-out some empty project, then import it rather than use the "New project" utility.
I fixed the problem by downloading a fresh copy of AndroidStudio. During one of the updates something went wrong so I delete all config files and freshly downloaded the file from the Internet and then it worked fine for me.
(I'm on a Mac)
If you are still receiving this error when creating a new project, then try opening the project (after error) and removing the following from your build.gradle file in your module.
dependencies {
compile 'com.android.support:support-v4:13.0.+'
}
I resolved this by installing some extras from Android SDK what I did not think I needed: Google Repository and Google Play services. In addition of Android Support Repository.
When manually running gradle you get more meaningful error messages.