I don't know how to add this library to my project.
https://github.com/alamkanak/Android-Week-View
thank you.
Edit : can anyone explain how to open the sample app as an android project?
https://github.com/alamkanak/Android-Week-View/tree/develop/sample
In your build.gradle(app:module) add this line in the dependencies block:
implementation 'com.github.alamkanak:android-week-view:1.2.6'
and follow instruction according to the link you posted.
On your file gradle insert into dependencies paste this compile 'com.github.alamkanak:android-week-view:1.2.6'
Example:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.+'
compile 'com.github.alamkanak:android-week-view:1.2.6'
}
Then click sync now.
Add this line inside module build.gradle file
compile "com.github.alamkanak:android-week-view:1.2.6"
Now sync gradle file and library will be added into project now you can follow instructions on github about calendar customization and settings
Related
I am porting an android application project built with non-eclipse tool, with gradle in use, perhaps the tool was Android Studio. I have the .zip file of the project. So, far I have put all layout,values and drawables in place. I am stuck at the last step of dependencies.
The project depends on Github : BlueJamesBond library and many others. This is the build.gradle dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile "com.android.support:support-v4:+"
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.github.bluejamesbond:textjustify-android:2.1.6'
}
Now, the BlueJamesBond itself is using gradle and I have no idea how gradle works. I was expecting some jar of the library which I could have added in Build Path. Can anyone please suggest how to resolve the dependency in my project?
I am using android studio, while trying to use HttpPost,HttpClient it says cannot find symbol. i surfed on internet and found that if we are at api level 23 we need to add some dependence so i added.
useLibrary 'org.apache.http.legacy'
and
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
}
in my build.gradle file. but even after adding this the same problem exist.
any other solution.
If you are having problem with dependency then download the jar from the following link and add it to your libs folder. Then right click on that jar then select Add as Library.
https://hc.apache.org/downloads.cgi
I installed Android Studio over existing SDK with the latest Android Support Library but with a blank project open it cannot resolve this: import android.support.v7.app.AppCompatActivity;
What should I do?
Check your gradle file. It must include (version may way):
compile 'com.android.support:appcompat-v7:23.3.0'
In your gradle.build include this dependency
compile 'com.android.support:appcompat-v7:23.3.0'
Check your build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
**compile 'com.android.support:appcompat-v7:23.2.0'**
}
This may solve your problem.
Cannot resolve symbol TabLayout ? How to clear this error? Please help me. I already imported import android.support.design.widget.TabLayout;
Had a similar problem, to fix this in Android Studio (AS) I went Build->Clean Project and AS sorted everything out. Make sure in your build.gradle file under dependencies that you have:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:your_api_version_number.0.0'
compile 'com.android.support:design:+'
}
I solved the issue Manually by adding the following two lines:
implementation 'com.android.support:support-v4:22.2.0'
implementation 'com.android.support:design:22.2.0'
under dependencies in \app\build.gradle worked for me.
Note: Your all the support libraries have to be the same version i.e. appcompat-v7 and support-v4 to same version e.g. 23.0.1; otherwise you can get this error
java.lang.NoClassDefFoundError: android.support.v7.internal.widget.TintManager`
after code build
Under Gradle Scripts,
Open build.gradle (Module: app)
Inside of dependencies add
compile 'com.android.support:design:25.3.1'
There may be a newer version of the library available, the android studio lint check may detect that.
The full dependencies area may look like this for reference. The above line is the only one I manually added.
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:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1'
}
An above answer suggested adding
compile 'com.android.support:design:+'
Which is kind of dangerous because it always uses the latest library, you may have trouble isolating bugs with automatic library updates happening in the background.
Android Studio no longer uses "compile", they use "implementation".
Be sure to include the code below when you go to Build Gradle>dependencies{
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
For Android API Level 29+, add the following dependency in build.gradle (Module:app):
dependencies {
implementation 'com.google.android.material:material:1.0.0'
}
If there is a newer version available, Android Studio will prompt you to use the newest one.
I solve it by Open build.gradle (Module: app) and add
implementation 'com.android.support:design:+'
My /build.gradle file:
....
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.0-rc1'
compile 'com.google.apis:google-api-services-analytics:v3-rev99-1.19.0'
}
And a source file:
import com.google.analytics.tracking.android.EasyTracker
where analitics is highlighted in red. Why isn't it found?
Try with the following instead:
compile 'com.google.android.gms:play-services:5.0.77'
Assuming you are trying to use V4. See
https://developers.google.com/analytics/devguides/collection/android/v4/
Follow Before you begin section.