小编And*_*eky的帖子

未找到客户端令牌,请设置客户端令牌

我正在尝试在 android 中使用 facebook 创建登录,但我遇到了这个问题。我不确定我还没有看到或设置什么。

我尝试设置应用程序令牌/客户端密码,但它一直失败。

下面是我的代码: 清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.test.app">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".SplashScreenActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".FacebookLoginActivity">
            <intent-filter>
                <action android:name="android.intent.action.FACEBOOK_LOGIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

        </activity>
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            tools:replace="android:theme" />
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAINACTIVITY" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
    </application>

    <uses-permission android:name="android.permission.INTERNET" />
</manifest>
Run Code Online (Sandbox Code Playgroud)

Facebook登录活动

 package com.test.app;
    public class FacebookLoginActivity extends AppCompatActivity {

        private TextView …
Run Code Online (Sandbox Code Playgroud)

android facebook facebook-android-sdk

4
推荐指数
1
解决办法
1620
查看次数

React-Native:更改ImageBackground的不透明度颜色

我一直在努力开发下面提到的屏幕:

为此,我创建了以下组件:

import React, {Component} from 'react';
import {View, Text, StyleSheet, ImageBackground, Image} from 'react-native';
import Balance from './Balance.js'

class AccountHeader extends React.Component{
    render(){
        return(
            <ImageBackground
                source={require('../images/lawrance.jpg')}
                style={styles.container}>
                    <View style={styles.overlay}></View>
                    <Text style = {[styles.textStyle, {paddingTop: 10}]} >My Account</Text>
                    <Image source= {require('../images/lawrance.jpg')}
                        style={styles.avatarStyle}/>
                    <Text style = {styles.textStyle} > Jenifer Lawrance</Text>
                    <Text style = {styles.textStyle} > +14155552671</Text>
                    <Balance style= {styles.balanceContainer}/>
            </ImageBackground>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        backgroundColor:'red',
        opacity: 0.6
    },
    overlay: {
        backgroundColor:'transparent',
        opacity: 0.6
    },
    avatarStyle: { …
Run Code Online (Sandbox Code Playgroud)

javascript css react-native imagebackground

4
推荐指数
4
解决办法
1万
查看次数

在构建时从 Gradle 设置静态变量

我有一个 Android 项目,在 git 下管理。Git 有 2 个分支(更多……但重要的是这两个),分支 a 和分支 b。是否可以设置 gradle 来确定项目是从哪个分支构建的,并public static String根据分支在项目的类之一中设置值?

谢谢。

java git android gradle android-studio

3
推荐指数
1
解决办法
2312
查看次数

如何在工具栏的顶部和底部放置颜色线

我想在工具栏上放置颜色水平线的顶部和底部,如下图所示: -

在此输入图像描述

在此图像中,绿线来自工具栏的两侧.

我想做同样的事.

我的布局xml:

    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="#FFFFFF"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

        <android.support.design.widget.TabLayout
            android:id="@+id/tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabMode="scrollable"
            app:tabGravity="fill"
            android:background="#F7F7F7" />
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"  />
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

谢谢 ..!!

android android-toolbar

3
推荐指数
1
解决办法
5537
查看次数

创建5种不同颜色的自定义栏

我想创建自定义view显示5种不同的颜色作为附加图像:

在此输入图像描述

有谁知道如何实现上述view

谢谢.

android android-custom-view android-progressbar

3
推荐指数
1
解决办法
157
查看次数

意外的最高级别异常:com.android.dex.DexIndexOverflowException:方法ID不在[0,0xffff]中:65536

我的Gradle文件中有以下依赖项:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "packagename"
        minSdkVersion 10
        targetSdkVersion 23
    }

    sourceSets {
        main {
            jni.srcDirs = []
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:23.0.1'
    compile files('libs/FLurry_3.2.2.jar')
    compile files('libs/pixel-perfect-collision.jar')
    compile files('libs/twitter4j-core-3.0.3.jar')
    compile project(':zip_file')
    compile project(':andEngine')
    compile project(':andEnginePhysicsBox2DExtension')
    compile project(':downloader_library')
    compile project(':viewPagerLibrary')
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'org.apache.commons:commons-lang3:3.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
}
Run Code Online (Sandbox Code Playgroud)

在构建gradle文件时,我得到以下错误:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: …
Run Code Online (Sandbox Code Playgroud)

android andengine android-studio android-multidex

1
推荐指数
1
解决办法
2412
查看次数