我需要帮助,因为我在连接到 RDS 上的托管 Postgres 数据库时遇到问题。我遇到以下错误消息:“主机 '16.151.149.51'、用户 'analytics'、数据库 'database' 没有 pg_hba.conf 条目,没有加密” 我已确认加密功能正常,并且我还将IP添加到安全组。我应该采取什么步骤来解决这个问题?
我收到谷歌播放消息,我的应用程序崩溃,在消息
java.lang.NullPointerException
at android.webkit.WebViewDatabase.initDatabase(WebViewDatabase.java:234)
at android.webkit.WebViewDatabase.init(WebViewDatabase.java:212)
at android.webkit.WebViewDatabase.access$000(WebViewDatabase.java:40)
at android.webkit.WebViewDatabase$1.run(WebViewDatabase.java:193)
Run Code Online (Sandbox Code Playgroud)
我没有在google或stackoverflow中找到类似的probloem所以我不知道为什么这个crach,但我知道这是由webview引起的.
我尝试拉伸视频以填充视频.目标是创建在设备中看起来像第一张照片的视图(就像它在布局预览中看起来一样).
这个问题的大多数答案都是指这个链接.
我尝试了这个,但我仍然没有填写视频视图.
这是我的布局代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/search_gren_screen">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/go_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="onclick"
android:text="Try again" />
<Button
android:id="@+id/back_to_pick_song"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Select another song"
android:onClick="onclick" />
<Button
android:id="@+id/btn_continue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="onclick"
android:text="Amazing, continue!" />
</LinearLayout>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<VideoView
android:id="@+id/videoView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_gravity="center" />
</FrameLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
在这里,您可以预览我声明的布局:

但是,设备上的结果是不同的:

我在google-play-services_lib SDK中没有更改任何内容,但我在此项目上有x并且在控制台中显示此错误消息 "Failed to create BuildConfig class"
最近我没有在google-play-services_lib项目或设置中更改任何内容或更新Eclipse
当我尝试清理项目时,我收到了这些细节发生的问题:
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'google-play-services_lib'.
Problems encountered while deleting resources.
Could not delete 'C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\bin\AndroidManifest.xml'.
Problems encountered while deleting files.
Could not delete: C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\bin\AndroidManifest.xml.
Problems encountered while deleting resources.
Could not delete 'C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\bin\AndroidManifest.xml'.
Problems encountered while deleting files.
Could not delete: C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\bin\AndroidManifest.xml.
Run Code Online (Sandbox Code Playgroud)

这个报告我从谷歌播放,我的应用程序崩溃:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.android.gms.common.account.CHOOSE_ACCOUNT (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1518)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1390)
at android.app.Activity.startActivityForResult(Activity.java:3204)
at com.example.uploadvideo.MainUploadToYoutube.authenticate(MainUploadToYoutube.java:287)
at com.example.uploadvideo.MainUploadToYoutube.onOptionsItemSelected(MainUploadToYoutube.java:211)
at android.app.Activity.onMenuItemSelected(Activity.java:2516)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:965)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:468)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:126)
at android.view.View$PerformClick.run(View.java:14155)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
Run Code Online (Sandbox Code Playgroud)
在com.example.uploadvideo.MainUploadToYoutube我有这个方法:
public void authenticate() {
Intent accountChooserIntent =
AccountPicker.newChooseAccountIntent(null, null,
new String[] {GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE}, true, "Select an account", null,
null, …Run Code Online (Sandbox Code Playgroud) 我尝试在服务中使用意图,但当我尝试这样做:
Intent intent_facebook = new Intent (this,MainUploadToYoutube.class);
intent_facebook.putExtra("vid", vid);
startActivity(intent_facebook);
Run Code Online (Sandbox Code Playgroud)
在logcat上遇到这个错误:
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
Run Code Online (Sandbox Code Playgroud)
所以我从这里尝试了这个:
Intent intent_facebook = new Intent(getBaseContext(), MainUploadToYoutube.class);
intent_facebook.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplication().startActivity( intent_facebook);
Run Code Online (Sandbox Code Playgroud)
但这没什么,我没有在logcat中得到错误
怎么了?
我需要以相同的布局播放youtube视频和录制视频.
为了执行此操作,我搜索youtube api,发现android版本需要高于2.2,这没关系,但是,我想使用VideoView.
我在这里看到一些关于这个问题的帖子,并决定最终使用此代码在VideoView中观看视频.
videoView = (VideoView) findViewById(R.id.your_video_view);
Log.d(TAG,getUrlVideoRTSP(current_url) + " id yotube1 " );
//here type the url...
videoView.setVideoURI(Uri.parse(getUrlVideoRTSP(current_url)));
videoView.setMediaController(new MediaController(this)); //sets MediaController in the video view
videoView.requestFocus();//give focus to a specific view
videoView.start();//starts the video
Run Code Online (Sandbox Code Playgroud)
这段代码有效,但只需使用rtsp链接:
String exemple = "rtsp://v4.cache3.c.youtube.com/CjYLENy73wIaLQlW_ji2apr6AxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYOr_86Xm06e5UAw=/0/0/0/video.3gp";
Run Code Online (Sandbox Code Playgroud)
我在url中有多个链接因此我需要代码将url转换为RTSP,我不能手动执行此操作,我检查一些代码并且所有代码都不起作用...
我试试这个:从这里 如何获得RTSP URL?
public static String getUrlVideoRTSP(String urlYoutube)
{
try
{
String gdy = "http://gdata.youtube.com/feeds/api/videos/";
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
String id = extractYoutubeId(urlYoutube);
URL url = new URL(gdy + id);
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); …Run Code Online (Sandbox Code Playgroud) 我尝试使用适用于 Android 项目的YouTube Direct Lite 应用程序上传视频https://code.google.com/p/ytd-android/
我执行了链接中提到的所有步骤。
该应用程序在我的 android 设备上运行良好,但我收到吐司“连接播放服务失败”和“发生内部错误”吐司。
和这个日志错误:
05-07 11:17:33.659: E/com.google.ytdl.UploadsListFragment(3140): Connection to Play Services Failed, error: 4, reason: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41836358: android.os.BinderProxy@41779308}}
Run Code Online (Sandbox Code Playgroud)
为了找出问题所在,我在这里生成了 api 密钥:
https://code.google.com/apis/console
Simple API Access
Use API keys to identify your project when you do not need to access user data. Learn more
Key for Android apps (with certificates)
API key:
xxxxxxxxxxxxxxxxxx
Android apps:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;com.google.ytdl
Activated on: Apr 16, 2013 11:30 AM
Activated by: xxxxx@gmail.com – you
Run Code Online (Sandbox Code Playgroud)
它看起来不错。
我红色这些链接:https …
android youtube-api google-api-java-client google-play-services
我试图预测系列的下一个值.我需要使用哪种最好的机器学习/算法?
我有这样的矩阵:
[114, 160, 60, 27]
[74, 97, 73, 14]
[119, 157, 112, 23]
Run Code Online (Sandbox Code Playgroud)
我想预测这个值:
[114, 160, 60, 27 , **80 , 90**]
[74, 97, 73, 14 , **10 , 15**]
[119, 157, 112, 23 , **50 , 48**]
Run Code Online (Sandbox Code Playgroud)
最好的方法是什么?
我试图在Jupiter上网本上运行tensorflow,python 2.7但我意识到它需要3.6 pythong版本所以我按照这个步骤:
使用Anaconda安装
通过调用以下命令创建名为tensorflow的conda环境:
C:> conda create -n tensorflow pip python=3.5
Run Code Online (Sandbox Code Playgroud)
通过发出以下命令激活conda环境:
C:> activate tensorflow
Run Code Online (Sandbox Code Playgroud)
(tensorflow)C:>#您的提示应该更改发出适当的命令在您的conda环境中安装TensorFlow.要安装仅CPU版本的TensorFlow,请输入以下命令:
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow
Run Code Online (Sandbox Code Playgroud)
要安装TensorFlow的GPU版本,请输入以下命令(在一行上):
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu
Run Code Online (Sandbox Code Playgroud)
**
**
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow
Run Code Online (Sandbox Code Playgroud)
告诉我这个错误:
由于EnvironmentError导致无法安装软件包:[WinError 5]访问被拒绝:'C:\ Users\idan\AppData\Local\Continuum\anaconda2\envs\tensorflow\Lib\site-packages \numpy\.libs\libopenblas. BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll'考虑使用该
--user选项或检查权限.
我试图更改用户权限,并以管理员身份打开anaconda cmd但它没有帮助.
当我尝试使用意图从主项目传递到库项目时,它工作正常,但是......当我尝试从库项目传递到主项目时,它无法识别主项目中的类。
我尝试在我的图书馆项目中写下这个意图:
Intent intent = new Intent(this,com.example.uploadvideo.class);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
我将我想要连接的两个活动添加到主项目和库项目的清单中。
我在我的应用程序中登录facebook按钮和发布按钮,当我使用它,它工作正常,但当我去布局我发现这个错误,我不知道什么意思...
我需要一个线索知道如何继续
这个错误来自布局
Exception raised during rendering: Could not resolve resource value: 0x7F08000A.
Exception details are logged in Window > Show View > Error Log
The following classes could not be instantiated:
- com.facebook.widget.LoginButton (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
android.content.res.Resources$NotFoundException: Could not resolve resource value: 0x7F070004.
at android.content.res.BridgeResources.throwException(BridgeResources.java:693)
at android.content.res.BridgeResources.getColor(BridgeResources.java:185)
at com.facebook.widget.LoginButton.<init>(LoginButton.java:204)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0( at …Run Code Online (Sandbox Code Playgroud) android ×9
amazon-rds ×1
anaconda ×1
aspect-ratio ×1
eclipse ×1
postgresql ×1
python ×1
python-3.x ×1
rtsp ×1
streaming ×1
tensorflow ×1
youtube ×1
youtube-api ×1