小编fre*_*dom的帖子

Android Studio 0.2.8 TODO颜色已经改变

刚刚更新到Android Studio 0.2.8,我的TODO项目突然变成蓝色,这使得它们使用Dracula方案完全无法读取.

Editor- > Colors & Fonts- > General- >中的颜色设置TODO defaults与更新前的颜色设置相同,但未使用.

模式in TODO也设置为Use color scheme TODO default colors.

还有其他地方指定TODO物品的颜色吗?

编辑
这似乎也发生在IntelliJ IDEA中.

user-interface android intellij-idea android-studio

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

Android Studio AdMob与Google Play服务集成

我正在尝试将admob功能添加到我的应用程序中.我做了一切,但我错过了一些关键点.

这是我的评价:

apply plugin: 'android'

android {
compileSdkVersion 19
buildToolsVersion '19.0.1'

defaultConfig {
    minSdkVersion 13
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:+'
    compile fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}
Run Code Online (Sandbox Code Playgroud)

这是广告视图的XML布局部分

`<com.google.ads.AdView
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:id="@+id/adView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    ads:adUnitId="ca-app-pub-8644867804576560/1489221139"
    ads:adSize="SMART_BANNER"
    ads:testDevices="*******50664**2"
    ads:loadAdOnCreate="true"/>`
Run Code Online (Sandbox Code Playgroud)

这些元标记和必要的权限将添加到Manifest.xml中

<meta-data android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version"/>

<activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
Run Code Online (Sandbox Code Playgroud)

最后这是崩溃时刻的logcat.

02-16 12:50:31.941    8898-8898/com.exampl.deneme E/AndroidRuntime? FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.exampl.deneme/com.exampl.deneme.MainActivity}: android.view.InflateException: …
Run Code Online (Sandbox Code Playgroud)

android admob google-play-services android-studio

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