英文:
ERROR: The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: /Users/samir/Library/Android/sdk/bin/java
问题
我最近打开了用于多用户登录的解析 Android 项目,然后 IntelliJ IDEA 显示了更多的错误,然后我按照步骤进行操作,并下载了所有的要求,但仍然出现错误。
> 错误:所提供的 javaHome 似乎无效。我找不到 java 可执行文件。尝试的位置:
> /Users/samir/Library/Android/sdk/bin/java
[错误页面的图片][1]
Java 文件内容如下:
/*
* 版权所有(c)2015-present,Parse,LLC。
* 保留所有权利。
*
* 此源代码在根目录中的 LICENSE 文件中根据 BSD 风格的许可证进行许可。
* 另附加的专利授权权利可以在同一目录中的 PATENTS 文件中找到。
*/
package com.parse.starter;
import android.app.Application;
import android.util.Log;
import com.parse.Parse;
import com.parse.ParseACL;
import com.parse.ParseException;
import com.parse.ParseObject;
import com.parse.ParseUser;
import com.parse.SaveCallback;
public class StarterApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// 启用本地数据存储。
Parse.enableLocalDatastore(this);
// 在此添加初始化代码
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId("")
.clientKey("")
.server("")
.build()
);
ParseObject object = new ParseObject("ExampleObject");
object.put("myNumber", "123");
object.put("myString", "rob");
object.saveInBackground(new SaveCallback () {
@Override
public void done(ParseException ex) {
if (ex == null) {
Log.i("Parse Result", "成功!");
} else {
Log.i("Parse Result", "失败:" + ex.toString());
}
}
});
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
defaultACL.setPublicReadAccess(true);
defaultACL.setPublicWriteAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
}
并且在名称为 **parse** 的地方显示错误。
[1]: https://i.stack.imgur.com/5XI2s.png
英文:
I recently open the parse android project for multiple user login and then IntelliJ IDEA Show much more error and then I follow the steps and I download
all the requirements but still getting error
> ERROR: The supplied javaHome seems to be invalid. I cannot find the
> java executable. Tried location:
> /Users/samir/Library/Android/sdk/bin/java
The java File is
/*
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.parse.starter;
import android.app.Application;
import android.util.Log;
import com.parse.Parse;
import com.parse.ParseACL;
import com.parse.ParseException;
import com.parse.ParseObject;
import com.parse.ParseUser;
import com.parse.SaveCallback;
public class StarterApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
// Add your initialization code here
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
.applicationId("")
.clientKey("")
.server("")
.build()
);
ParseObject object = new ParseObject("ExampleObject");
object.put("myNumber", "123");
object.put("myString", "rob");
object.saveInBackground(new SaveCallback () {
@Override
public void done(ParseException ex) {
if (ex == null) {
Log.i("Parse Result", "Successful!");
} else {
Log.i("Parse Result", "Failed" + ex.toString());
}
}
});
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
defaultACL.setPublicReadAccess(true);
defaultACL.setPublicWriteAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
}
}
and it shows error where their is name parse
专注分享java语言的经验与见解,让所有开发者获益!
评论