什么意思"应用程序必须使用开发标识进行签名"?但ipa已经从xcode签了......
Appium是1.4.8
日志:
[INST STDERR] Instruments Trace Error : Target failed to run: Permission to debug com.. was denied. The app must be signed with a development identity (e.g. iOS Developer).
Run Code Online (Sandbox Code Playgroud)
怎么了?
我通过教程将我的lib上传到bintray.com ,现在在"文件"选项卡中存在文件列表.
1)我可以直接添加到app/libs
文件夹中
2)上传到bintray.com的文件有什么区别?
3)如何在没有make命令的情况下在MyProject中查找文件gradlew bintrayUpload
?
*-javadoc.jar
*-javadoc.jar.asc
*-sources.jar
*-sources.jar.asc
*.aar
*.aar.asc
*.pom
*.pom.asc
Run Code Online (Sandbox Code Playgroud)
我已经更新了顶级build.gradle文件:从
classpath 'com.android.tools.build:gradle:3.1.4'
Run Code Online (Sandbox Code Playgroud)
至
classpath 'com.android.tools.build:gradle:3.3.0'
Run Code Online (Sandbox Code Playgroud)
现在无法在Bitbucket-Pipelines上构建项目:错误是:
FAILURE: Build failed with an exception.
* Where:
Build file '/opt/atlassian/pipelines/agent/build/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 4.10.1. Current version is 4.4. If using the gradle wrapper, try editing the distributionUrl in /opt/atlassian/pipelines/agent/build/gradle/wrapper/gradle-wrapper.properties to gradle-4.10.1-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get …
Run Code Online (Sandbox Code Playgroud) 我将清单中的接收器替换为我的:
<receiver android:name="com.myparse.app.MyReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
Run Code Online (Sandbox Code Playgroud)
这是我的MyReceiver:
public class MyReceiver extends ParsePushBroadcastReceiver {
@Override
protected void onPushReceive(Context mContext, Intent intent) {
// super.onPushReceive(arg0, arg1);
if (intent.hasExtra("com.parse.Data")){
String jsonString=intent.getExtras().getString("com.parse.Data");
//-------------
}
public void onPushOpen(Context context, Intent intent) {
//To track "App Opens"
ParseAnalytics.trackAppOpenedInBackground(intent);
//Here is data you sent
Log.i("", intent.getExtras().getString( "com.parse.Data" ));
Intent i = new Intent(context, MainActivity.class);
i.putExtras(intent.getExtras());
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
Run Code Online (Sandbox Code Playgroud)
一切正常但如果我关闭应用程序,然后发送推送通知 - >应用程序崩溃与以下日志:
11-09 21:13:11.621: E/com.parse.PushService(23087): The Parse …
Run Code Online (Sandbox Code Playgroud) 我尝试使用Parceler来使用ORMLite,但Parceler会收到错误:
Error:(44, 36) error: Parceler: Unable to find read/write generator for type com.j256.ormlite.dao.ForeignCollection<PassKeyItem> for CategoryItem.passKeyItems
Run Code Online (Sandbox Code Playgroud)
这是我的对象:
CategoryItem.class
@Parcel
@DatabaseTable(tableName = "categories")
public class CategoryItem {
...
@ForeignCollectionField(columnName = FIELD_PASS_KEY_ITEMS)
ForeignCollection<PassKeyItem> passKeyItems;
}
Run Code Online (Sandbox Code Playgroud)
PassKeyItem.class
@Parcel
@DatabaseTable(tableName = "passkey")
public class PassKeyItem {
...
@DatabaseField(foreign = true, foreignAutoRefresh = true, columnName = FIELD_CATEGORY_ITEM_ID)
private CategoryItem categoryItem;
}
Run Code Online (Sandbox Code Playgroud) 我无法确定是GPS打开还是关闭,isProviderEnabled总是"假"但GPS打开.
public abstract class BaseGPSActivity extends AppCompatActivity{
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
Log.v(TAG, " GPS is enabled: "+isGPSEnabled()))
Run Code Online (Sandbox Code Playgroud)
public boolean isGPSEnabled(){
String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
if(provider != null)
Log.v(TAG, " Location providers: "+provider);
return mLocationManager!=null && mLocationManager.isProviderEnabled( LocationManager.GPS_PROVIDER );
}
Run Code Online (Sandbox Code Playgroud)
输出是:
V/BaseGPSActivity: Location providers: network
V/BaseGPSActivity: GPS is enabled: false
Run Code Online (Sandbox Code Playgroud) 表现:
<service android:name="com.example.MainService" android:process=":main_service"/>
Run Code Online (Sandbox Code Playgroud)
尝试在活动中绑定服务:
public class MainActivity extends Activity {
MainService mMainService;
private boolean mBound;
@Override
protected void onCreate(Bundle savedInstanceState) {
bindService(intentForMainService, mConnection, Context.BIND_AUTO_CREATE)
}
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className,
IBinder service) {
MainService.MainServiceBinder binder = (MainService.MainServiceBinder) service;//HERE IS EXCEPTION
mMainService = (MainService) binder.getService();
mBound = true;
}
public void onServiceDisconnected(ComponentName className) {
mMainService = null;
mBound = false;
}
};
@Override
protected void onStop() {
doUnbindService();
super.onStop();
}
void doUnbindService() {
if …
Run Code Online (Sandbox Code Playgroud) 我想向 Android Studio/Intellij-idea 工具栏添加一个按钮来执行自定义命令。例如:
./gradlew --stop
但是当我单击时Customize Menus and Toolbar...
只能添加 Android Studio Actions:
此代码有效,每次都会显示通知,但是如果我取消注释行setContent, setCustomContentView, setCustomBigContentView
,则通知不会显示。为什么它不与 CustomContentView 一起显示?
var notificationId = 1
private fun displayNotification() {
createNotificationChannel()
val notificationLayout = RemoteViews(context.packageName, R.layout.view_notification_collapsed)
val notification = NotificationCompat.Builder(context, "CHANNEL_ID")
.setSmallIcon(R.mipmap.ic_launcher)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setAutoCancel(true)
.setShowWhen(true)
.setPriority(NotificationCompat.PRIORITY_MAX)
.setCategory(NotificationCompat.CATEGORY_SOCIAL)
.setStyle(NotificationCompat.DecoratedCustomViewStyle())
//.setContent(notificationLayout)
//.setCustomContentView(notificationLayout)
//.setCustomBigContentView(notificationLayout)
.setContentIntent(
PendingIntent.getActivity(
context,
0,
Intent(context, MainActivity::class.java),
0
)
)
.build()
val notificationManager = NotificationManagerCompat.from(context)
notificationManager.notify(notificationId++, notification)
}
private fun createNotificationChannel() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
return
}
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val notificationChannel = notificationManager.getNotificationChannel("CHANNEL_ID")
if (notificationChannel == null) {
val …
Run Code Online (Sandbox Code Playgroud) 我制作了可滚动的内容,但如何添加scrollbarThumbVertical
?
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.SpaceBetween,
horizontalAlignment = Alignment.CenterHorizontally
) {
Column(
modifier = Modifier
.fillMaxWidth()
.verticalScroll(rememberScrollState())//how to add here scrollbar?
.weight(1f, fill = false)
) {
//content
}
//another not scrollable content
}
Run Code Online (Sandbox Code Playgroud)