0

I imported the volley library as .jar file and I added it as a library (right click >add as library ).

When I try to run the app I get the Error

no main manifest attribute, in /Users/ervincosic/AndroidStudioProjects/AirportCab247/app/libs/library-1.0.19.jar

See here the screenshot

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
Ervin Cosic
  • 114
  • 1
  • 12
  • It doesn't seem to be connected with Volley. Clean project if that doesn't work try to remove it and compile again. – Serafins Feb 11 '16 at 19:20
  • do you maybe know how to connect it properly ? – Ervin Cosic Feb 11 '16 at 19:24
  • way I did it: download Volley and place in 'app/libs/volley'. and in gradle add: compile project(':volley') – Serafins Feb 11 '16 at 19:27
  • @ErvinCosic You should probably add it as a dependency via the dependencies menu. `Project Structure` -> `Module` -> `Dependencies` -> click `+` -> choose `Library Dependency` -> type volley -> hit Return -> select com.android.volley -> click Ok – nukeforum Feb 11 '16 at 19:29
  • Instead of downloading Volley, you can use gradle copy. Add this line to your repositiry: compile 'com.mcxiaoke.volley:library-aar:1.0.0' – Serafins Feb 11 '16 at 19:29

1 Answers1

0

It doesn't seem to be connected with Volley. Clean project if that doesn't work try to remove it and compile again. To do that you can simply add dependency to your build.gradle file. You should have something like:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion ...
    ....


    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.android.support:appcompat-v7:23.1.1'
        ...

        compile 'com.mcxiaoke.volley:library:1.+'
    }

If you want to read about other methods of importing VOLLELY, click here.

Community
  • 1
  • 1
Serafins
  • 1,237
  • 1
  • 17
  • 36