我正在寻找关于如何firebase-tools在我的角度6.0项目上正确设置托管的教程,我发现的总是这样.
- firebase init
- then select the Hosting
- What do you want to use as your public directory? dist
- Configure as a single-page app (rewrite all urls to /index.html)? Yes
- Overwrite? No
- ng build --prod
- firebase deploy
Run Code Online (Sandbox Code Playgroud)
但在这之后,这总是我所拥有的.
升级到Android Studio 3.0之后,我遇到了gradle的一些问题,我能够修复开发者网站上的检查
但是,我无法找到如何解决这个问题,apply plugin: 'android-apt'我尝试了几个方面,比如从项目gradle中删除它并将其添加到app gradle中annotationProcessor 'com.neenbedankt.gradle.plugins:android-apt:1.8'.还删除了apt等等.
无论如何,Studio正在抱怨它.任何帮助是极大的赞赏.谢谢!
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
}
ext {
supportLibVersion = '27.0.0'
firebaseLibVersion = '11.4.2'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
APP GRADLE
apply plugin: 'com.android.application'
android …Run Code Online (Sandbox Code Playgroud) android build.gradle android-gradle-plugin butterknife android-studio-3.0
如何替换用户输入中的特定单词并将其显示为星号。这是我的代码。
String[] filteredWords = ["apple", "banana", "orange"];
private String convertWord(String input) {
StringBuilder asterisk = new StringBuilder();
for (String filter: filteredWords) {
if (input.toLowerCase().contains(filter)) {
for (int i = 0; i < filter.length(); i++) {
asterisk.append("*");
}
input = input.replace(filter, asterisk.toString());
}
}
return input;
}
Run Code Online (Sandbox Code Playgroud)
例如,用户输入或输入“这是苹果而不是橙子”,预期输出将是“这是*****而不是******”。
但我的问题是,当用户输入(带有字符大小写)“This is Apple and not oRaNGE”或“This is aPpLe and not Orange”时,输出没有改变。苹果和橙子这个词没有被星号取代。
任何帮助表示赞赏。谢谢!