我正在尝试从https://android-arsenal.com/details/1/1375添加样式化的进度条
它说:
将特定存储库添加到构建文件中:
repositories {
maven {
url "https://jitpack.io"
}
}
Run Code Online (Sandbox Code Playgroud)
在构建文件中添加依赖项(不要忘记指定正确的限定符,通常是'aar'):
dependencies {
compile 'com.github.akexorcist:Android-RoundCornerProgressBar:1.0.0'
}
Run Code Online (Sandbox Code Playgroud)
好吧,我做到了... build.gradle(Project)
buildscript {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
build.gradle(Module):apply plugin:'com.android.application'
android {compileSdkVersion 21 buildToolsVersion"21.1.2"
defaultConfig {
applicationId "com.example.chaz.simsirl"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName …Run Code Online (Sandbox Code Playgroud) 因此,我正在尝试创建一个网站,您可以在其中输入名为 Info 的对象的标题和价格。当我输入标题和价格并按提交时,它被重定向到的页面显示“找不到 InfosController 的操作\'更新\'”。我希望它闪烁一条消息,通知用户对象已成功创建。有什么帮助吗?
\n\n控制器/infos_controller.rb
\n\nclass InfosController < ApplicationController\n def index\n @info = Info.new\n end\n\ndef create\n @info = Info.new(params[:info])\n\nif @info.save\n flash[:notice] = \'Object created successfully, thank you\'\n render :index\n else\n flash[:notice] = \'Sorry! Object was not created successfully\'\n render :new\n end\nend\n def update\n @info = Info.find(params[:id])\n if @info.update_attributes(params[:info])\n # if update is successful\n else \n # if update is unsuccessful\n end\n redirect_to infos_path\nend\nend\nRun Code Online (Sandbox Code Playgroud)\n\n视图/infos/index.html.erb
\n\n<h1>Please enter information about an Info object</h1>\n<%= form_for @info, url: {action: …Run Code Online (Sandbox Code Playgroud)