Я попытался подключиться к серверу Parse AWS в первый раз, но я не мог понять, где находится ошибка, а также в разборе / панели инструментов, я не видел ни одного запущенного приложения. Я попытался запустить с использованием открытого текста traffi c = true в файле манифеста, но безрезультатно. Как еще можно решить эту проблему? Я пытаюсь настроить фоновый сервер для приложения
StartApplication. java
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("hello")
.clientKey("world")
.server("http://3.14.127.150:1338/parse/")
.build()
);
//MsW5DpcUSVXa
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);
}
}
Манифест. xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.parse.starter">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name=".StarterApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Ошибка LogCat:
2020-04-20 16:38:12.143 10323-10323/com.parse.starter I/m.parse.starte: Unquickening 13 vdex files!
2020-04-20 16:38:12.144 10323-10323/com.parse.starter W/m.parse.starte: Unexpected CPU variant for X86 using defaults: x86
2020-04-20 16:38:12.334 10323-10323/com.parse.starter I/m.parse.starte: The ClassLoaderContext is a special shared library.
2020-04-20 16:38:12.336 10323-10323/com.parse.starter I/m.parse.starte: The ClassLoaderContext is a special shared library.
2020-04-20 16:38:12.718 10323-10323/com.parse.starter I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
2020-04-20 16:38:12.834 10323-10357/com.parse.starter D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2020-04-20 16:38:13.017 10323-10365/com.parse.starter D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
2020-04-20 16:38:13.018 10323-10365/com.parse.starter D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
2020-04-20 16:38:13.024 10323-10365/com.parse.starter D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
2020-04-20 16:38:13.251 10323-10323/com.parse.starter W/m.parse.starte: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2020-04-20 16:38:13.252 10323-10323/com.parse.starter W/m.parse.starte: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2020-04-20 16:38:13.472 10323-10363/com.parse.starter D/HostConnection: HostConnection::get() New Host Connection established 0xcfc57d70, tid 10363
2020-04-20 16:38:13.479 10323-10363/com.parse.starter D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
2020-04-20 16:38:13.486 10323-10363/com.parse.starter W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2020-04-20 16:38:13.507 10323-10363/com.parse.starter D/EGL_emulation: eglCreateContext: 0xcfc1a4e0: maj 2 min 0 rcv 2
2020-04-20 16:38:13.568 10323-10363/com.parse.starter D/EGL_emulation: eglMakeCurrent: 0xcfc1a4e0: ver 2 0 (tinfo 0xcfc0f920)
2020-04-20 16:38:13.597 10323-10363/com.parse.starter I/Gralloc4: mapper 4.x is not supported
2020-04-20 16:38:13.598 10323-10363/com.parse.starter W/Gralloc3: mapper 3.x is not supported
2020-04-20 16:38:13.601 10323-10363/com.parse.starter D/HostConnection: createUnique: call
2020-04-20 16:38:13.601 10323-10363/com.parse.starter D/HostConnection: HostConnection::get() New Host Connection established 0xdca2b450, tid 10363
2020-04-20 16:38:13.602 10323-10363/com.parse.starter D/eglCodecCommon: allocate: Ask for block of size 0x100
2020-04-20 16:38:13.602 10323-10363/com.parse.starter D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3fd791000 size 0x2000
2020-04-20 16:38:13.605 10323-10363/com.parse.starter D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
2020-04-20 16:38:13.653 10323-10363/com.parse.starter D/EGL_emulation: eglMakeCurrent: 0xcfc1a4e0: ver 2 0 (tinfo 0xcfc0f920)
2020-04-20 16:38:13.856 10323-10323/com.parse.starter W/InputMethodManager: Ignoring onBind: cur seq=47, given seq=46
2020-04-20 16:39:20.733 10323-10323/com.parse.starter I/Parse Result: Failedcom.parse.ParseRequest$ParseRequestException: i/o failure
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at com.parse.ParseRequest$2.then(ParseRequest.java:145)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at com.parse.ParseRequest$2.then(ParseRequest.java:139)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at bolts.Task$15.run(Task.java:917)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020-04-21 11:46:44.396 9707-9707/com.parse.starter W/System.err: at java.lang.Thread.run(Thread.java:923)
2020-04-21 11:46:44.397 9707-9707/com.parse.starter W/System.err: Caused by: java.net.SocketTimeoutException: failed to connect to /3.14.127.150 (port 1338) from /10.0.2.15 (port 45342) after 10000ms
2020-04-21 11:46:44.397 9707-9707/com.parse.starter W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:190)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:134)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
2020-04-21 11:46:44.398 9707-9707/com.parse.starter W/System.err: at java.net.Socket.connect(Socket.java:621)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
2020-04-21 11:46:44.399 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseURLConnectionHttpClient.executeInternal(ParseURLConnectionHttpClient.java:51)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:158)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseRequest$3.then(ParseRequest.java:136)
2020-04-21 11:46:44.400 9707-9707/com.parse.starter W/System.err: at com.parse.ParseRequest$3.then(ParseRequest.java:133)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task$15.run(Task.java:917)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task.completeAfterTask(Task.java:908)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task.continueWithTask(Task.java:715)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task.continueWithTask(Task.java:726)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task$13.then(Task.java:818)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: at bolts.Task$13.then(Task.java:806)
2020-04-21 11:46:44.401 9707-9707/com.parse.starter W/System.err: ... 4 more