- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我的安卓应用打不开。我真的不知道为什么。任何帮助将不胜感激。谢谢!顺便说一句,它里面有谷歌地图和 firebase。
两个gradle
文件都在底部
以下是 logcat/run 的输出:
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.lrtapp.ardentmap, PID: 2781
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lrtapp.ardentmap/com.lrtapp.ardentmap.MainActivity}: java.lang.NullPointerException: println needs a message
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2925)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3060)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:110)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1800)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6649)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
Caused by: java.lang.NullPointerException: println needs a message
at android.util.Log.d(Log.java:145)
at com.lrtapp.ardentmap.MainActivity.onCreate(MainActivity.java:79)
at android.app.Activity.performCreate(Activity.java:7130)
at android.app.Activity.performCreate(Activity.java:7121)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1262)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2905)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3060)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:110)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1800)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6649)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
I/rtapp.ardentma: NativeAlloc concurrent copying GC freed 7646(2MB) AllocSpace objects, 2(40KB) LOS objects, 49% free, 1588KB/3MB, paused 8.189ms total 105.027ms
I/Process: Sending signal. PID: 2781 SIG: 9
Application terminated. at android.util.Log.println_native(Native Method)
下面是代码:
主要 Activity 类
package com.lrtapp.ardentmap;
import android.app.Activity;
import android.app.Dialog;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Intent;
import android.graphics.Color;
import android.nfc.Tag;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.firebase.iid.FirebaseInstanceId;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity";
private static final int ERROR_DIALOG_REQUEST = 9001;
private Button btnAbout;
private Button btnContact;
private Button btnVideos;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnAbout = (Button) findViewById(R.id.btnAbout);
btnAbout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAbout();
}
});
btnContact = (Button) findViewById(R.id.btnContact);
btnContact.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
openContact();
}
});
btnVideos = (Button) findViewById(R.id.btnVideos);
btnVideos.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
openVideos();
}
});
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
NotificationChannel mChannel =
new NotificationChannel(Constants.CHANNEL_ID, Constants.CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH);
mChannel.setDescription(Constants.CHANNEL_DESCRIPTION);
mChannel.enableLights(true);
mChannel.setLightColor(Color.RED);
mChannel.enableVibration(true);
mChannel.setVibrationPattern(new long[]{100, 200, 300, 400 ,500 ,400, 300, 200, 400});
mNotificationManager.createNotificationChannel(mChannel);
}
common.currentToken = FirebaseInstanceId.getInstance().getToken();
Log.d("My Token", common.currentToken);
if(isServicesOK())
init();
}
private void init(){
Button btnMap = (Button) findViewById(R.id.btnMap);
btnMap.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this, MapActivity.class);
startActivity(intent);
}
});
}
public boolean isServicesOK(){
Log.d(TAG, "isServicesOK: checking google services version");
int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(MainActivity.this);
if(available == ConnectionResult.SUCCESS){
//everything is okay
Log.d(TAG, "isServicesOK: Google Play services is working");
return true;
}else if(GoogleApiAvailability.getInstance().isUserResolvableError(available)){
// an error occured but we can resolve it
Log.d(TAG, "isServicesOK: an error occured but we can fix it");
Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(MainActivity.this, available, ERROR_DIALOG_REQUEST);
dialog.show();
}else{
Toast.makeText(this, "we cant make map requests", Toast.LENGTH_SHORT).show();
}
return false;
}
public void openAbout(){
Intent intent = new Intent(this, About.class);
startActivity(intent);
}
public void openContact(){
Intent intent = new Intent(this, Contact.class);
startActivity(intent);
}
public void openVideos(){
Intent intent = new Intent(this, Videos.class);
startActivity(intent);
}
}
FirebaseMessagingService 类
package com.lrtapp.ardentmap;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.nfc.Tag;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.firebase.messaging.RemoteMessage;
public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService {
private static final String TAG = "FirebaseMessagingService";
public FirebaseMessagingService() {
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
String title = remoteMessage.getNotification().getTitle();
String body = remoteMessage.getNotification().getBody();
MyNotificationManager.getInstance(getApplicationContext())
.displayNotification(title, body);
}
@Override
public void onDeletedMessages() {
}
}
Android list
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lrtapp.ardentmap">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/erlogo"
android:label="EaseRoute"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyALC_Pis5w391INiqcvnXO7dipxuMP0-JA" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MapActivity" />
<activity android:name=".About" />
<activity android:name=".Contact" />
<activity android:name=".Videos"></activity>
<service android:name=".FirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name=".MyFirebaseIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent"/>
</application>
</manifest>
我的通知管理器类
package com.lrtapp.ardentmap;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
public class MyNotificationManager {
private Context mCtx;
private static MyNotificationManager mInstance;
private MyNotificationManager(Context context){
mCtx = context;
}
public static synchronized MyNotificationManager getInstance(Context context){
if(mInstance == null){
mInstance = new MyNotificationManager(context);
}
return mInstance;
}
public void displayNotification(String title, String body){
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mCtx, Constants.CHANNEL_ID)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(title)
.setContentText(body);
Intent intent = new Intent(mCtx, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(mCtx, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pendingIntent);
NotificationManager mNotificationManager = (NotificationManager) mCtx.getSystemService(Context.NOTIFICATION_SERVICE);
if(mNotificationManager != null){
mNotificationManager.notify(1, mBuilder.build());
}
}
}
常量类
package com.lrtapp.ardentmap;
public class Constants {
public static final String CHANNEL_ID = "mychannelid";
public static final String CHANNEL_NAME = "mychannelname";
public static final String CHANNEL_DESCRIPTION = "myDescription";
}
谷歌地图类
package com.lrtapp.ardentmap;
import android.Manifest;
import android.content.pm.PackageManager;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.media.Image;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.gcm.Task;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.tasks.OnCompleteListener;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class MapActivity extends AppCompatActivity implements OnMapReadyCallback {
@Override
public void onMapReady(GoogleMap googleMap) {
Toast.makeText(this, "map is ready", Toast.LENGTH_SHORT).show();
Log.d(TAG, "onMapReady: map is ready");
mMap = googleMap;
if (mLocationPermissionGranted) {
getDeviceLocation();
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return;
}
mMap.setMyLocationEnabled(true);
mMap.getUiSettings().setMyLocationButtonEnabled(false);
init();
}
}
private static final String TAG = "MapActivity";
private static final String FINE_LOCATION = Manifest.permission.ACCESS_FINE_LOCATION;
private static final String COURSE_LOCATION = Manifest.permission.ACCESS_COARSE_LOCATION;
private static final int LOCATION_PERMISSION_REQUEST_CODE = 1234;
private static final float DEFAULT_ZOOM = 15f;
//widgets
private EditText mSearchText;
private ImageView mGps;
//vars
private boolean mLocationPermissionGranted = false;
private GoogleMap mMap;
private FusedLocationProviderClient mFusedLocationProviderClient;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
mSearchText = (EditText) findViewById(R.id.input_search);
mGps = (ImageView) findViewById(R.id.ic_gps);
getLocationPermission();
}
private void init(){
Log.d(TAG, "init: Initializing");
mSearchText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
if (actionId == EditorInfo.IME_ACTION_SEARCH
|| actionId == EditorInfo.IME_ACTION_DONE
|| keyEvent.getAction() == keyEvent.ACTION_DOWN
|| keyEvent.getAction() == keyEvent.KEYCODE_ENTER){
//execute method for searching
geoLocate();
}
return false;
}
});
mGps.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d(TAG, "onClick: clicked gps icon");
getDeviceLocation();
}
});
hideSoftKeyboard();
}
private void geoLocate(){
Log.d(TAG, "geoLocate: geolocating");
String searchString = mSearchText.getText().toString();
Geocoder geocoder = new Geocoder(MapActivity.this);
List<Address> list = new ArrayList<>();
try{
list = geocoder.getFromLocationName(searchString, 1);
}catch(IOException e){
Log.e(TAG, "geoLocate: IOException" + e.getMessage());
}
if(list.size() > 0){
Address address = list.get(0);
Log.d(TAG, "GeoLocate: found a Location: " +address.toString());
// Toast.makeText(this, address.toString(), Toast.LENGTH_SHORT()).show();
moveCamera(new LatLng(address.getLatitude(), address.getLongitude()), DEFAULT_ZOOM,
address.getAddressLine(0));
}
}
private void getDeviceLocation(){
Log.d(TAG, "getDeviceLocation: getting the device's current location.");
mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);
try {
if (mLocationPermissionGranted){
final com.google.android.gms.tasks.Task location = mFusedLocationProviderClient.getLastLocation();
location.addOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(@NonNull com.google.android.gms.tasks.Task task) {
if(task.isSuccessful()){
Log.d(TAG, "Found Location");
Location currentLocation = (Location) task.getResult();
moveCamera(new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude()),
DEFAULT_ZOOM,
"My Location");
}else{
Log.d(TAG, "onComplete: current Location is null");
Toast.makeText(MapActivity.this, "unable to get current location", Toast.LENGTH_SHORT).show();
}
}
});
}
}catch (SecurityException e){
Log.e(TAG, "getDeviceLocation: SecurityException: " + e.getMessage());
}
}
@Override
protected void finalize() throws Throwable {
super.finalize();
}
private void moveCamera(LatLng latLng, float zoom, String title){
Log.d(TAG, "moving the camera to: lat: " + latLng.latitude + ", lng: " +latLng.longitude);
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,zoom));
if(!title.equals("My Location")){
MarkerOptions options = new MarkerOptions()
.position(latLng)
.title(title);
mMap.addMarker(options);
}
hideSoftKeyboard();
}
private void initMap(){
Log.d(TAG, "initMap: initializing map");
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(MapActivity.this);
}
private void getLocationPermission(){
Log.d(TAG, "getLocationPermission: getting location permissions");
String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};
if(ContextCompat.checkSelfPermission(this.getApplicationContext(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){
if(ContextCompat.checkSelfPermission(this.getApplicationContext(), COURSE_LOCATION) == PackageManager.PERMISSION_GRANTED){
mLocationPermissionGranted = true;
initMap();
}else{
ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);
}
}else{
ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Log.d(TAG, "onRequestPermissionsResult: called.");
mLocationPermissionGranted = false;
switch (requestCode){
case LOCATION_PERMISSION_REQUEST_CODE:{
if(grantResults.length > 0){
for(int i = 0; i < grantResults.length; i++){
if(grantResults[i] != PackageManager.PERMISSION_GRANTED){
mLocationPermissionGranted = false;
Log.d(TAG, "onRequestPermissionsResult: permission failed.");
return;
}
}
mLocationPermissionGranted = true;
Log.d(TAG, "onRequestPermissionsResult: permission granted.");
//initializing map
initMap();
}
}
}
}
private void hideSoftKeyboard(){
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
}
项目 Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
**Module/App Gradle**
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.lrtapp.ardentmap"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-core:16.0.3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'me.biubiubiu.justifytext:library:1.1'
//Google Play Services
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
//implementation 'com.google.android.gms:play-services:11.4.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
}
apply plugin: 'com.google.gms.google-services'
任何类型的答案将不胜感激。提前致谢!
最佳答案
日志说:
Caused by: java.lang.NullPointerException: println needs a message
at android.util.Log.d(Log.java:145)
at com.lrtapp.ardentmap.MainActivity.onCreate(MainActivity.java:79)
在您的日志记录的第 79 行,common.currentToken 为 null。
FirebaseInstanceId.getInstance().getToken();
从那时起,您可以看到这个答案以及您的 token 返回 null 的一些可能性:
FirebaseInstanceIdService getToken returning null
一个快速的肮脏修复是注释那行 (79) 但您的通知将不起作用。
关于java - Android apk 即使在模拟器上也打不开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52439039/
我已经为我的 Android 应用设置了 Google Play 测试版程序。想象一下以下场景: 我将 apk1 作为 versionCode 1 的测试版发布 Beta 用户安装此 Beta 版本
我需要在 android studio 中生成一个未签名的 APK。我看到了其他一些关于此的问题。 Export unsigned apk from a Gradle Project in Andro
我想知道更新是如何进行的?它如何更新特定文件仅更改?我的意思是在更新期间,整个 apk 是否再次安装或仅特定文件更改?它是如何工作的?我只想知道 android market 如何在没有用户提示的情况
如何在使用新 apk 的情况下升级 android 应用程序而不丢失以前的 apk 数据? 最佳答案 有一个versionCode AndroidManifest.xml 中的元素。这是一个整数,每个
我看到 Android 在输出文件夹中同时创建了一个“普通”APK 和一个 androidTest APK? 即 app-dev-debug.apk app-dev-debug-androidTest
Upload failed You uploaded an APK that is signed with a different certificate to your previous APKs.
对我来说,这发生在所有项目中。当我从 Android Studio 生成签名的 apk 时,我收到以下正确消息: 问题:在此之后,当我实际上并没有生成签名的 apk 时,我继续为项目发生的每个构建收到
我需要在 Windows 上反编译 & 重新编译一个 apk... 我正在关注此链接 Reverse Engineer APK 问题是我找不到发出请求的文件(请参阅上面的链接)“找到发出请求的文件 g
我寻找一种方法来制作一个可以更改我的第一个 apk 的默认图标的 apk。例如 ADW Launcher。 我该怎么做?也许是一种获取另一个 apk 的绘图的方法? 感谢您的帮助。 最佳答案 我想您正
我正在开发一个基于图像的应用程序,具有以下属性: 手机版本的 apk 大小(不含图像)约为 15MB,平板电脑版本约为 25MB。 图像总大小约为 30MB。 该应用程序将以测试版状态发布,可能会频繁
假设在网站上我有一个 apk 和网站的在线 JSON 数据,现在依赖于那个 apk 我想用新的 JSON 数据重新生成新的 apk 文件,还需要Manifest文件中的应用图标也要动态变化,包名也要动
今天我注意到当我在 Eclipse 中导出我的应用程序时,我得到了一个无扩展名的文件。我过去没有注意到这一点,所以我将此文件作为我的应用程序的 APK 文件上传到 Google Play。当我今天看到
我有一个同时适用于手机/平板电脑和电视的应用程序。当我在电视上使用 leanback 时,这个项目由 3 个模块组成。第一个(库)包含电视和移动/平板电脑模块通用的所有类,然后我有电视和移动/平板电脑
我制作了一个仅包含微调器和按钮的基本应用程序,但它的 Release模式大小为 1.4 MB,我认为这太大了,因为也有很多低于 200kB 的好应用程序可用 所以我在 gradle 文件中尝试了 b
我的移动开发人员已向我提供了一个 APK 文件,我需要将其上传到商店。它说,你需要在 Release模式下编译它。有没有一种方法可以让我对 apk 执行此操作,使其进入 Release模式并使用 ke
我在里面制作了一个 android 应用程序,我已经在“res/raw”文件夹中放置了一个 apk 文件,现在我在安装我的 apk 时想要什么,raw 文件夹中的 apk 也会安装,而无需再次单击安装
我有一个带有未签名包的 android 应用程序,每当我尝试安装此 apk 时,都会出现以下错误消息:Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]。 现
我开发的 Android 应用由不同的人群进行测试。 我们使用 Google Play Beta 方案。 同一组测试人员也提供生产支持。完成测试后,他们需要将设备恢复为生产应用,以便反射(reflec
我有一个已发布的应用程序。该应用程序使用 Google 的许可检查,因此为了测试该应用程序的新版本(使用测试帐户),必须在开发者控制台中上传 APK: 对于尚未上传到 Google Play 的应用程
我正在制作一个应用程序,我想在其中调用其他一些 apk(未预装),它们存在于我手机的 SD 卡中,我希望在安装主应用程序时安装它们。这可能吗?以及如何? 最佳答案 您可以使用以下 Intent 请求
我是一名优秀的程序员,十分优秀!