导入了FacebookSDK,但缺少类运行时异常(imported FacebookSDK and yet missing class runtime exception)
我有以下android布局xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.facebook.widget.LoginButton android:id="@+id/authButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="30dp" /> </LinearLayout>
但是我得到运行时错误:
甚至可以在图形编辑器中看到:
但我不明白为什么,因为我已正确导入了FacebookSDK(我认为)
当我做cmd +右键单击XML时,我得到了正确的类实现
`package com.facebook.widget;
公共类LoginButton扩展Button {`
我错过了什么?
I have the following android layout xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <com.facebook.widget.LoginButton android:id="@+id/authButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="30dp" /> </LinearLayout>
However I get runtime error:
which can even be seen in the Graphical editor:
But I don't get why, as I have imported the FacebookSDK properly (i think)
and when I do cmd + right click on the XML I get to the right class implementation
`package com.facebook.widget;
public class LoginButton extends Button {`
What am I missing?
原文:https://stackoverflow.com/questions/21202121
最满意答案
我相信证书存储在CentOS上的
/etc/pki/tls/certs/
中。 您可以将开发机器上的内容与生产机器上的内容进行比较I had to do two things to get this working.
1) Copied my server certs to the
TLS_CACERTDIR
in/etc/openldap/ldap.conf
.2) Ran
/usr/sbin/cacertdir_rehash
onTLS_CACERTDIR
. This step is apparently important since I'm using CentOS 6.After this, LDAP worked with
ldapsearch
and with PHP'sldap_bind
.
相关问答
更多-
使用ldap_errno() 。 http://php.net/manual/en/function.ldap-errno.php 可能的错误代码列表: http : //www.php.net/manual/en/function.ldap-errno.php#20665 Use ldap_errno(). http://php.net/manual/en/function.ldap-errno.php List of possible error codes: http://www.php.net/ma ...
-
连接打开会话。 绑定是实际验证你的东西。 因此,您已连接但未使用有效凭证登录。 Connect opens the session. Bind is what actually authenticates you. Thus you connected but did not login with valid credentials.
-
PHP - ldap_bind错误期望参数1是资源,给定布尔值(PHP - ldap_bind error expects parameter 1 to be resource, boolean given)[2022-04-22]
它看起来像一个无效的证书错误。 即使发生错误, ldap_connect()也将始终返回资源。 关于文件; ldap_connect()将始终返回资源,因为它实际上没有连接,只是初始化连接参数。 实际连接发生在下一次调用ldap_* ,通常使用ldap_bind(). 如果您使用的是无效证书,则可以强制接受配置 /etc/openldap/ldap.conf 同 TLS_REQCERT allow或TLS_REQCERT never指令。 如果您没有权限修改conf文件,只需通过putenv('LDAPTL ... -
问题很可能是ldap_errno接受了ldap 连接资源 ,并且当ldap_bind失败时,你无法使用它的结果来检索errno。 另外:你试过通过@符号来抑制错误吗? 例如: $ldapconn = ldap_connect("localhost"); @$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); if( $ldapbind ) { // Everything went fine } else { // Use the connec ...
-
OpenDJ中没有可以产生结果差异的配置。 我唯一能想到的是你没有进行类似的调用,或者没有以相同的方式迭代结果。 There is no configuration in OpenDJ that can produce such difference in results. The only thing I can think of is that you are not making similar calls, or not iterating through the result the same w ...
-
我相信证书存储在CentOS上的/etc/pki/tls/certs/中。 您可以将开发机器上的内容与生产机器上的内容进行比较 I had to do two things to get this working. 1) Copied my server certs to the TLS_CACERTDIR in /etc/openldap/ldap.conf. 2) Ran /usr/sbin/cacertdir_rehash on TLS_CACERTDIR. This step is apparent ...
-
我在Symfony github上转发了这个问题。 @ChadSikorra也在那里。 他明确表示我的问题是什么。 这是他的解释: 如果查看集合类,在类中调用initialize()之前,不会对结果资源进行任何操作。 如果你确实返回数组('output'=> array('bare'=> $ bare,'symfony'=> $ symf-> toArray())); 它将调用initialize,您将看到类中填充的条目。 除非还有其他事情发生。 I reposted this question on th ...
-
为什么ldap_bind无法对SimpleAD进行身份验证?(Why is ldap_bind failing to authenticate against SimpleAD?)[2022-09-10]
所以我可以使用UPN作为标识来使用它: ldap_bind($ldapconn, "Administrator@ldap.patontheback.org", ""); 它有效,但它无法解释为什么其他方式不起作用。 So I could get it to work using UPN as the identifie: ldap_bind($ldapconn, "Administrator@ldap.patontheback.org", " "); It work ... -
LDAP连接绑定不成功(LDAP connection bind not successful)[2022-06-11]
对于那些后来看起来的人。 问题是 - 防火墙阻止除我们自己以外的所有其他LDAP连接。 这就是为什么来自forumsys的测试LDAP服务器不起作用的原因。 安装php-ldap ,如果防火墙允许,您可以继续连接到任何LDAP服务器。 希望这可以帮助! :) For anyone who looks this up later. The problem is - there was a firewall blocking all other LDAP connections except our own. ... -
您可以使用ldap_count_entries()从服务器获取快速计数,以查看是否找到了某种东西。 这可能比首先检索搜索结果更快,并且看到没有任何内容。 所以它可能看起来像这样: foreach($Servers as $Server) { $sLoop++; $connect = 'ldap://'.$Server; $lcon = ldap_connect($connect); ldap_set_option($lcon, LDAP_OPT_PROTOCOL_VERS ...