Anandhu
Anandhu

Reputation: 312

Error when importing Library in android

I am trying to implement Google Analytics in my android app for that I need to import one library. when I am trying to import that library it shows one error like

Could not write file: C:\Documents and Settings\ignite054\Desktop\i\Version                    
      4\Project\PashuPalan\.classpath.
C:\Documents and Settings\ignite054\Desktop\i\Version 4\Project\PashuPalan\.classpath   
(Access is denied)

How to solve this? please help me.

Upvotes: 0

Views: 339

Answers (2)

Ashokkumar
Ashokkumar

Reputation: 67

Make sure that the directory and file is still there. And, take a look that C:\Documents and Settings\ignite054\Desktop\i\Version
4\Project\PashuPalan is a valid path, has a .classpath file and it is readable. Maybe .classpath file is hidden, removing the hidden attribute may resolve the issue.

Upvotes: 0

GrIsHu
GrIsHu

Reputation: 23638

First copy the jar file from the android-sdk\extras\google\analytics_sdk_v2\libGoogleAnalytics.jar and add it into your projects libs folder.

The try to add library libGoogleAnalytics.jar to build path (in libs right click on libGoogleAnalytics.jar -> BuildPAth -> Add to Build Path).

Do not add anything in Manifest file and in your java file use Ctrl+Shift+O to automatically organize your imports.

Upvotes: 1

Related Questions