Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: You must create this type of ParseObject using ParseObject.create() or the proper subclass. #142

Open
KarimRedaHassan opened this issue Jul 12, 2016 · 1 comment

Comments

@KarimRedaHassan
Copy link

KarimRedaHassan commented Jul 12, 2016

I have followed the steps on
https://github.com/ParsePlatform/ParseUI-Android
to use the ParseLoginUI library in my project.

Here is exactly what I have done in steps:

  1. I added the following code to my app build.gardle
    dependencies {
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.+'
    }

  2. Add the following code in my Application.onCreate to initialize the Parse library
    Parse.initialize(this,YOUR_APPLICATION_ID, YOUR_CLIENT_KEY);

  3. add permissions to app manifest file

  4. Add the following code in app build.gardle
    compile 'com.parse:parseui-login-android:0.0.1'
    compile 'com.parse:parseui-widget-android:0.0.1'

  5. Add the following to the app manifest file within the section.



  6. Add the following code to my MainActivity in the onCreate() before setContentView() -i don't know if the position of the code matters in this case or not -
    ParseLoginBuilder builder = new ParseLoginBuilder(MainActivity.this);
    startActivityForResult(builder.build(), 0);

  7. Run the app

The app is compiled and run with no errors but when I write name and password and re-password and email then Press Create account, the app crashes and the following error appears in the logCat

07-12 16:36:01.730 2468-2468/? D/AndroidRuntime: Shutting down VM
07-12 16:36:01.730 2468-2468/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.gigamole.navigationtabbar, PID: 2468
java.lang.IllegalArgumentException: You must create this type of ParseObject using ParseObject.create() or the proper subclass.
at com.parse.ParseObject.(ParseObject.java:365)
at com.parse.ParseObject.(ParseObject.java:334)
at com.parse.ParseUser.(ParseUser.java:162)
at com.parse.ui.ParseSignupFragment.onClick(ParseSignupFragment.java:178)
at android.view.View.performClick(View.java:5198)
at android.view.View$PerformClick.run(View.java:21147)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-12 16:36:01.730 1361-1915/? W/ActivityManager: Force finishing activity com.gigamole.navigationtabbar/com.parse.ui.ParseLoginActivity

I really need this issue to be solved so that I could use the ParseLoginUi library in my project

I think this issue is similar to this one
Import project vs dependencies #125
But I don't find the right solution in this issue.

@sariabuzahra
Copy link

Try to use
compile 'com.parse:parseui-login-android:0.0.2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants