1

I'm beginner with Java/Android and Parse. Today i need your help . I don't know what i'm doing wrong. Look to my picture

enter image description here

My .jar file is in "Lib" , but i'm receiving the red lines in my project. Also ,how can you see in Parse.initialize seems that this is not recognized.

Leogreen
  • 701
  • 1
  • 6
  • 20

1 Answers1

1

you should import classes

add this import statement to your codes

import com.parse.Parse; 

and import every class you need you can also import all classes

 import com.parse.blablabla.....;

and if you have added .jar files you can fix imports in android studio .check this one

follow these steps

1) add parse libs to your project.

2)clean your project

3) add import statement

import com.parse.Parse; 

you can see i have no error after i did those steps

this is my project no errors

enter image description here

Community
  • 1
  • 1
Madhawa Priyashantha
  • 9,633
  • 7
  • 33
  • 60
  • @Leogreen what? yesterday ? – Madhawa Priyashantha Nov 04 '14 at 12:55
  • Yesterday I did it : import com.parse.Parse; I added this but still got an error in runtime i did like in parse.com tutorial to android . you can see in picture above – Leogreen Nov 04 '14 at 12:59
  • yes ,but i did it before ,after i tried other thing . lol But my .jar file is in the right place? – Leogreen Nov 04 '14 at 13:07
  • ok very thanks! Thanks for your time! Tonight i'll try again ,,and i tell you about! – Leogreen Nov 04 '14 at 13:14
  • 1
    Wow helped me a lot. Thanks!! Yes now ,i have no more the red lines. is everything okay. But when i try to do this tutorial(parse oficial) https://parse.com/apps/quickstart#parse_data/mobile/android/native/new i don't have sucess ( nothing good ,nothing wrong). – Leogreen Nov 04 '14 at 23:48
  • And i'm receiving this: error: cannot access Task class file for bolts.Task not found .So , i added bolts.jar https://dl.dropboxusercontent.com/u/103204235/Captura%20de%20tela%202014-11-04%2022.31.25.png But is different of your picture.And i still have the same error. – Leogreen Nov 05 '14 at 00:38
  • with: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile files('src/libs/Parse-1.7.1.jar') compile files('src/libs/bolts-android-1.1.3') i have no problem .. but i still have no sucess. Why? my app run but i don't receive results in Parse.com >>>> 0 req. this month :( – Leogreen Nov 05 '14 at 00:55
  • @Leogreen i have no experience with parse.com..so i can't figure-out your rest of errors.anyway you don't need to aadd compile files('src/libs/Parse-1.7.1.jar') since { compile fileTree(dir: 'libs', include: ['*.jar']) compiles all jars in lib. – Madhawa Priyashantha Nov 05 '14 at 03:09