我试图Install-Module Azure在PowerShell中安装Azure .我收到以下错误:
PS C:\Windows\system32> Install-Module Azure
Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is corre
ct and try again.
At line:1 char:1
+ Install-Module Azure
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
为什么PS无法识别基本的安装模块?没有这个,我甚至无法安装Azure.我该怎么办?
我正在尝试在Kotlin中实现Mike Penz的NavigationDrawer(https://github.com/mikepenz/MaterialDrawer)的部分内容.从那以后,我遇到了一些问题,主要是运营商.以下是实例化抽屉本身的代码的一部分.Android Studio不会抛出任何错误,除非我在int和Long变量上使用==运算符:
// Create the Drawer
result = DrawerBuilder()
.withSliderBackgroundColor(ContextCompat.getColor(applicationContext, R.color.top_header))
.withActivity(this)
.withToolbar(toolbar)
.withHasStableIds(true)
.withItemAnimator(AlphaCrossFadeAnimator())
.withAccountHeader(headerResult!!)
.addDrawerItems(
PrimaryDrawerItem().withName(R.string.drawer_item_profile).withIcon(FontAwesome.Icon.faw_user).withIdentifier(1).withSelectable(false).withIconColor(ContextCompat.getColor(applicationContext, R.color.icon_grey)).withTextColor(ContextCompat.getColor(applicationContext, R.color.stroke)),
PrimaryDrawerItem().withName(R.string.drawer_item_create).withIcon(FontAwesome.Icon.faw_paint_brush).withIdentifier(2).withSelectable(false).withIconColor(ContextCompat.getColor(applicationContext, R.color.icon_grey)).withTextColor(ContextCompat.getColor(applicationContext, R.color.stroke)),
PrimaryDrawerItem().withName(R.string.drawer_item_yaanich_news).withIcon(FontAwesome.Icon.faw_newspaper_o).withIdentifier(3).withSelectable(false).withIconColor(ContextCompat.getColor(applicationContext, R.color.icon_grey)).withTextColor(ContextCompat.getColor(applicationContext, R.color.stroke)),
PrimaryDrawerItem().withName(R.string.drawer_item_my_groups).withIcon(FontAwesome.Icon.faw_users).withIdentifier(4).withSelectable(false).withIconColor(ContextCompat.getColor(applicationContext, R.color.icon_grey)).withTextColor(ContextCompat.getColor(applicationContext, R.color.stroke)),
PrimaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog).withIdentifier(5).withSelectable(false).withIconColor(ContextCompat.getColor(applicationContext, R.color.icon_grey)).withTextColor(ContextCompat.getColor(applicationContext, R.color.stroke))
)
.withOnDrawerItemClickListener { view, position, drawerItem ->
if (drawerItem != null) {
var intent: Intent? = null
if (drawerItem.identifier == (1) {
intent = Intent(this, UserProfileActivity::class.java)
} else if (drawerItem.identifier == 2) {
intent = Intent(this, YeetActivity::class.java)
} else if (drawerItem.identifier == 3) {
intent …Run Code Online (Sandbox Code Playgroud) Failed to set up SDK: Error:Module 'app': platform 'Google Inc.:Google APIs:21' not found.
Run Code Online (Sandbox Code Playgroud)
完全失去了为什么这不起作用.尝试将我的SDK更新到23,但意识到我还没准备好处理所有新的弃用等,所以我在Mercurial上恢复了旧版本.我完全没有其他任何东西,而且回归应该已经解决了所有问题.不幸的是,我无法连接我的应用程序并构建它.我甚至从头开始重新安装Android Studio,但我仍然收到相同的警告,我的应用程序根本无法构建.什么可能出错?
这是我的构建gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.elgami.customizer"
minSdkVersion 14
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
//runProguard false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.ogaclejapan.smarttablayout:library:1.5.0@aar'
compile 'com.github.antonyt:InfiniteViewPager:v1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'
// recyclerview
compile 'com.android.support:recyclerview-v7:23.1.1'
// google analytics
compile 'com.google.android.gms:play-services-analytics:8.3.0'
// pager sliding strip …Run Code Online (Sandbox Code Playgroud) 我意识到以下是不正确的,但我想你可以把它当作伪代码.我想知道,如何将整个布局"附加"到我的RecyclerView上,这样当我向下滚动布局时,它会随着它滚动出来.目前,RecyclerView上方的TextView固定在屏幕上,而我的RecyclerView中的所有数据都是可滚动的.当用户向下滚动页面时,我希望TextView移出视线.如果您查看Instagram,当您向下滚动页面时,图库顶部的所有用户个人资料信息都会消失.我怎样才能做到这一点?如何以编程方式添加TextView?
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Hello!" />
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="?android:attr/actionBarSize"
android:padding="@dimen/item_margin"
android:id="@+id/recycler_view"
android:clipToPadding="false">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Hello!" />
</android.support.v7.widget.RecyclerView>
Run Code Online (Sandbox Code Playgroud) set homepath=%userprofile%
set a=%1
set b=%2
set c=%3
set uuid=%4
set zipDirectory=%5
set pluginDirectory=%6
cd %homepath%\%a%
mvn archetype:generate -DarchetypeCatalog=file://%homepath%/.m2/repository
Run Code Online (Sandbox Code Playgroud)
到这里一切正常,然后命令行停止执行。它不打印 1,也不打印后续命令。
1
c
b
c
%uuid%
Y
cd %homepath%\%a%\%b%
mvn clean install
cd %homepath%\%a%\%b%\%b%-plugin\target
jar -xvf %zipDirectory%
cd %homepath%\%a%\%b%\%b%-plugin\target\META-INF\maven\%c%\%b%-plugin
copy pom.xml + %pluginDirectory%
cd %pluginDirectory%
rename pom.xml %b%-plugin-1.0.0.pom
Run Code Online (Sandbox Code Playgroud)
问题:有什么我不知道的关于 maven 会中断批处理的事情吗?执行带有单独编号 1 的命令不明白吗?
我正在关注这里的入门教程: https: //facebook.github.io/react-native/docs/getting-started.html。我可以使用 启动我的包管理器react-native start。但运行应用程序本身总是会导致崩溃。
$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug...
Error occurred during initialization of VM
Unable to use shared archive.
An error has occurred while processing the shared archive file.
Unable to unmap shared space.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected …Run Code Online (Sandbox Code Playgroud) 我正在尝试让用户接受相机许可请求.我把它放在我的onCreate()方法中.它说它无法解析符号'CAMERA'.怎么了?
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 1);
}
}
Run Code Online (Sandbox Code Playgroud) 我一直在收到错误Plugin with id 'android-apt' not found.这里出了什么问题?
plugins {
id "me.tatarka.retrolambda" version "3.2.5"
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 24
buildToolsVersion '23.0.3'
dexOptions {
javaMaxHeapSize "6g"
}
defaultConfig {
applicationId "com.yitter.android"
minSdkVersion 15
targetSdkVersion 24
multiDexEnabled true // Enabling multidex support.
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
//runProguard false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" } …Run Code Online (Sandbox Code Playgroud) 我在该生产线的构建等级中收到以下警告消息compile 'com.google.android.gms:play-services-analytics:9.2.0'.这是什么意思?
All com.google.android.gms libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 9.2.0, 8.4.0. Examples include com.google.android.gms:play-services-basement:9.2.0 and com.google.android.gms:play-services-ads:8.4.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
Run Code Online (Sandbox Code Playgroud)
这是我的app build.gradle: …
我正在尝试从我的Android Processing草图中保存图像,但是我收到错误.如何将草图保存到用户手机图库中的图像文件?
public void draw(){
beginShape();
for (int i=0; i<d.length; i++){
d[i].maison();
int stroke1 = (int) random(255);
int stroke2 = (int) random(255);
int stroke3 = (int) random(255);
stroke(stroke1, stroke2, stroke3);
noFill();
vertex(d[i].x , d[i].y);
}
endShape(CLOSE);
UUID idOne = UUID.randomUUID();
save(idOne + ".tga");
}
Run Code Online (Sandbox Code Playgroud)
错误:
09-15 23:47:25.939 23317-23389/tutorials.androidstudio.fragmentsv3 E/AndroidRuntime:FATAL EXCEPTION:动画线程进程:tutorials.androidstudio.fragmentsv3,PID:23317 java.lang.NullPointerException:尝试调用虚方法'java .io.File android.app.Activity.getFileStreamPath(java.lang.String)'处理处理中的process.core.PApplet.savechPath(未知来源)处的null对象引用处理过程中的处理. tutorials.androidstudio.fragmentsv3.Sketch $ override.draw(Sketch.java:74)中的.core.PApplet.save(未知来源)在tutorials.androidstudio.fragmentsv3.Sketch $ override.access $ dispatch(Sketch.java)的教程在Processing.core.PApplet.run处理Processing.core.PGraraicsAndroid2D.requestDraw(未知来源)的processing.core.PApplet.handleDraw(未知来源)处的.androidstudio.fragmentsv3.Sketch.draw(Sketch.java:0)(未知来源) )在java.lang.Thread.run(Thread.java:818)
android ×8
java ×4
gradle ×2
azure ×1
batch-file ×1
build ×1
build.gradle ×1
butterknife ×1
command ×1
inject ×1
javascript ×1
kotlin ×1
maven ×1
permissions ×1
powershell ×1
processing ×1
react-native ×1
sdk ×1
shell ×1
xml ×1