我尝试用facebook SDK测试登录.
所以我加上compile 'com.facebook.android:facebook-android-sdk:4.0.0'.
然后添加FacebookSdk.sdkInitialize(getApplicationContext());
到MainActivity.java
但是当我补充说
<com.facebook.login.widget.LoginButton
android:id="@+id/login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:layout_marginBottom="30dp" />`
Run Code Online (Sandbox Code Playgroud)
我有以下错误:
Rendering Problems The following classes could not be instantiated:
com.facebook.login.widget.LoginButton (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE
Exception Details java.lang.NoClassDefFoundError: Could not initialize class com.facebook.login.widget.LoginButton
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:385) Copy stack to clipboard
Run Code Online (Sandbox Code Playgroud) 我目前正在 debian 服务器下构建 Wordpress 安装。我安装了 PHP7、curl 和 Apache2
当我尝试安装新扩展时,我收到此错误消息:
cURL error 60: SSL certificate problem: self signed certificate in certificate chain
Run Code Online (Sandbox Code Playgroud)
在阅读了一些处理类似问题的帖子后,我尝试用这个修改 php.ini :
curl.cainfo = /etc/php7.0/cacert.pem
Run Code Online (Sandbox Code Playgroud)
但是即使重新启动apache,我仍然面临这个问题。
有任何想法吗 ?
提前致谢
我有这段代码,将pdf文件作为参数并将其转换为JPG。我的问题是,当 pdf 有不止一页的魔杖时,会创建这样的图像:test-0.jpg、test-1.jpg 等。
with Img(filename=args['pdf'] + file, resolution=300) as pic:
pic.compression_quality = 100
pic.save(filename='images/test.jpg')
Run Code Online (Sandbox Code Playgroud)
我怎么能说魔杖只转换给定 pdf 的第一页?
谢谢 !
我有一个大学的 BASH 项目,有两个我不明白的错误
这是我的脚本 BASH :
#!/bin/bash
proc_name=`cat /proc/cpuinfo | grep 'model name' | cut -d':' -f2 |cut -d'@' -f1 | uniq`;
proc_freq=`cat /proc/cpuinfo | grep 'model name' | cut -d':' -f2 |cut -d'@' -f2 | uniq`;
proc_core=`cat /proc/cpuinfo | grep 'cpu cores' | cut -d':' -f2 | uniq`;
proc_hyperthreading=`cat /proc/cpuinfo | grep 'siblings' | cut -d':' -f2 | uniq`;
proc_architecture=`lscpu | grep '64-bit' | cut -d',' -f2 | cut -d'-' -f1`;
proc_cache_L1=`lscpu | grep 'Cache L1i' | cut -d':' …Run Code Online (Sandbox Code Playgroud)