mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 15:56:48 +08:00
Show crash report in another activity
This commit is contained in:
Generated
+1
@@ -9,6 +9,7 @@
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/drawable/ic_linear_layout.xml" value="0.175" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/drawable/ic_relative_layout.xml" value="0.175" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_about.xml" value="0.2" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_crash_handler.xml" value="0.25" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_designer.xml" value="0.264" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_download.xml" value="0.1188034188034188" />
|
||||
<entry key="..\:/Projects/AndroidStudioProjects/AndroidIDE/app/src/main/res/layout/activity_editor.xml" value="0.264" />
|
||||
|
||||
+5
-1
@@ -79,7 +79,11 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Annotation processors
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
|
||||
// Annotation processors
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
|
||||
|
||||
implementation common.utilcode
|
||||
|
||||
@@ -21,12 +21,20 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="UnusedAttribute,MediaCapabilities">
|
||||
<activity
|
||||
android:name=".CrashHandlerActivity"
|
||||
android:windowSoftInputMode="stateAlwaysHidden"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.itsaky.androidide.REPORT_CRASH" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@@ -54,6 +62,7 @@
|
||||
android:name=".TerminalActivity"
|
||||
android:configChanges="orientation|screenSize|uiMode"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
|
||||
<service
|
||||
android:name=".services.MessagingService"
|
||||
android:exported="false">
|
||||
@@ -61,6 +70,7 @@
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<receiver
|
||||
android:name=".services.LogReceiver"
|
||||
android:enabled="true"
|
||||
@@ -69,6 +79,7 @@
|
||||
<action android:name="com.itsaky.androidide.logs.APPEND_LOG" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
android:resource="@mipmap/ic_launcher" />
|
||||
@@ -79,4 +90,5 @@
|
||||
android:name="com.google.firebase.messaging.default_notification_channel_id"
|
||||
android:value="@string/cms_channel_id_devs" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AndroidIDE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide;
|
||||
|
||||
import static com.blankj.utilcode.util.AppUtils.getAppVersionCode;
|
||||
import static com.blankj.utilcode.util.AppUtils.getAppVersionName;
|
||||
import static com.blankj.utilcode.util.DeviceUtils.getManufacturer;
|
||||
import static com.blankj.utilcode.util.DeviceUtils.getModel;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ClipboardUtils;
|
||||
import com.itsaky.androidide.app.BaseApplication;
|
||||
import com.itsaky.androidide.app.StudioActivity;
|
||||
import com.itsaky.androidide.databinding.ActivityCrashHandlerBinding;
|
||||
|
||||
public class CrashHandlerActivity extends StudioActivity {
|
||||
|
||||
private ActivityCrashHandlerBinding binding;
|
||||
|
||||
public static final String REPORT_ACTION = "com.itsaky.androidide.REPORT_CRASH";
|
||||
public static final String TRACE_KEY = "crash_trace";
|
||||
|
||||
@Override
|
||||
protected View bindLayout () {
|
||||
binding = ActivityCrashHandlerBinding.inflate (getLayoutInflater ());
|
||||
return binding.getRoot ();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate (Bundle savedInstanceState) {
|
||||
super.onCreate (savedInstanceState);
|
||||
binding.closeButton.setOnClickListener (v -> finishAffinity ());
|
||||
|
||||
final var extra = getIntent ().getExtras ();
|
||||
if (extra == null) {
|
||||
binding.closeButton.performClick ();
|
||||
return;
|
||||
}
|
||||
|
||||
final var report = buildReportText (extra.getString (TRACE_KEY, "Unable to get logs."));
|
||||
binding.logText.setText (report);
|
||||
binding.reportButton.setOnClickListener (v -> reportTrace (report));
|
||||
}
|
||||
|
||||
private void reportTrace (String report) {
|
||||
ClipboardUtils.copyText ("AndroidIDE CrashLog", report);
|
||||
final var url = BaseApplication.GITHUB_URL.concat ("/issues");
|
||||
final var intent = new Intent ();
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
intent.setData (Uri.parse (url));
|
||||
intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity (intent);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private String buildReportText (String trace) {
|
||||
return "AndroidIDE crash report\n" +
|
||||
"Manufacturer: " +
|
||||
getManufacturer () +
|
||||
"\n" +
|
||||
"Device: " +
|
||||
getModel () +
|
||||
"\n" +
|
||||
"App version: " +
|
||||
getAppVersionName () +
|
||||
" (" +
|
||||
getAppVersionCode () +
|
||||
")\n\n Stacktrace: \n" +
|
||||
trace;
|
||||
}
|
||||
}
|
||||
@@ -140,11 +140,11 @@ public class MainActivity extends StudioActivity implements View.OnClickListener
|
||||
|
||||
@Override
|
||||
public void onClick(View p1) {
|
||||
if (p1.getId() == binding.createProject.getId())
|
||||
if (p1.getId() == binding.createProject.getId()) {
|
||||
showCreateProject();
|
||||
else if (p1.getId() == createBinding.createprojectClose.getId())
|
||||
} else if (p1.getId() == createBinding.createprojectClose.getId()) {
|
||||
hideCreateProject();
|
||||
else if (p1.getId() == createLayoutBinding.nextCard.getId()) {
|
||||
} else if (p1.getId() == createLayoutBinding.nextCard.getId()) {
|
||||
currentTemplateIndex++;
|
||||
if (currentTemplateIndex >= mTemplates.size()) currentTemplateIndex = 0;
|
||||
showTemplate(currentTemplateIndex);
|
||||
@@ -152,13 +152,16 @@ public class MainActivity extends StudioActivity implements View.OnClickListener
|
||||
currentTemplateIndex--;
|
||||
if (currentTemplateIndex < 0) currentTemplateIndex = mTemplates.size() - 1;
|
||||
showTemplate(currentTemplateIndex);
|
||||
} else if (p1.getId() == createLayoutBinding.createprojectCreate.getId())
|
||||
} else if (p1.getId() == createLayoutBinding.createprojectCreate.getId()) {
|
||||
createNewProject();
|
||||
else if (p1.getId() == binding.gotoPreferences.getId()) {
|
||||
} else if (p1.getId() == binding.gotoPreferences.getId()) {
|
||||
gotoSettings();
|
||||
} else if (p1.getId() == binding.openProject.getId()) {
|
||||
pickProject();
|
||||
} else if(p1.getId() == binding.openTerminal.getId()) {
|
||||
if (true) {
|
||||
throw new RuntimeException ("hello. this is a crash handler test");
|
||||
}
|
||||
startActivity(new Intent(this, TerminalActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
**************************************************************************************/
|
||||
package com.itsaky.androidide.app;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.blankj.utilcode.util.ThrowableUtils;
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
import com.itsaky.androidide.CrashHandlerActivity;
|
||||
import com.itsaky.androidide.language.xml.completion.XMLCompletionService;
|
||||
import com.itsaky.androidide.project.ProjectResourceFinder;
|
||||
import com.itsaky.androidide.services.IDELogService;
|
||||
@@ -38,15 +42,14 @@ import java.util.Set;
|
||||
public class StudioApp extends BaseApplication {
|
||||
|
||||
private static StudioApp instance;
|
||||
private boolean stopGradleDaemon = true;
|
||||
private static ApiInfo mApiInfo;
|
||||
private static AttrInfo mAttrInfo;
|
||||
private static WidgetInfo mWidgetInfo;
|
||||
|
||||
private IResourceFinder mResFinder;
|
||||
|
||||
private XMLCompletionService mXmlCompletionService;
|
||||
private ILayoutInflater mLayoutInflater;
|
||||
private Thread.UncaughtExceptionHandler uncaughtExceptionHandler;
|
||||
|
||||
public static final boolean DEBUG = com.itsaky.androidide.BuildConfig.DEBUG;
|
||||
|
||||
@@ -55,6 +58,8 @@ public class StudioApp extends BaseApplication {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
instance = this;
|
||||
this.uncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler(this::handleCrash);
|
||||
super.onCreate();
|
||||
|
||||
FirebaseMessaging.getInstance().subscribeToTopic(MessagingService.TOPIC_UPDATE);
|
||||
@@ -63,6 +68,24 @@ public class StudioApp extends BaseApplication {
|
||||
initializeApiInformation();
|
||||
}
|
||||
|
||||
private void handleCrash(Thread thread, Throwable th) {
|
||||
writeException(th);
|
||||
|
||||
try {
|
||||
final var intent = new Intent ();
|
||||
intent.setAction (CrashHandlerActivity.REPORT_ACTION);
|
||||
intent.putExtra (CrashHandlerActivity.TRACE_KEY, ThrowableUtils.getFullStackTrace (th));
|
||||
intent.addFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity (intent);
|
||||
|
||||
if(this.uncaughtExceptionHandler != null) {
|
||||
this.uncaughtExceptionHandler.uncaughtException(thread, th);
|
||||
}
|
||||
} catch (Throwable error) {
|
||||
LOG.error ("Unable to show crash handler activity", error);
|
||||
}
|
||||
}
|
||||
|
||||
public void createInflater (LayoutInflaterConfiguration config) {
|
||||
this.mLayoutInflater = ILayoutInflater.newInstance(config);
|
||||
}
|
||||
@@ -127,7 +150,6 @@ public class StudioApp extends BaseApplication {
|
||||
}
|
||||
|
||||
public void setStopGradleDaemon(boolean startGradleDaemon) {
|
||||
this.stopGradleDaemon = startGradleDaemon;
|
||||
}
|
||||
|
||||
public static StudioApp getInstance() {
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ This file is part of AndroidIDE.
|
||||
~
|
||||
~ AndroidIDE is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ AndroidIDE is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!--
|
||||
~ This file is part of AndroidIDE.
|
||||
~
|
||||
~ AndroidIDE is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ AndroidIDE is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".CrashHandlerActivity">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/close_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/bg_ripple"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/crash_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/msg_ide_crashed"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/crash_subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/msg_report_crash"
|
||||
android:textColor="@color/secondaryTextColor_light"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/close_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/crash_title" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/log_text_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="16dp"
|
||||
android:fillViewport="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/crash_subtitle">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/secondaryColor"
|
||||
tools:text="This is an error message."/>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/msg_crash_report_hint"
|
||||
android:textColor="@color/secondaryTextColor"
|
||||
app:layout_constraintBottom_toTopOf="@+id/report_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/report_button"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:backgroundTint="@color/secondaryColor"
|
||||
android:text="@string/msg_copy_report_action"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<!-- AndroidIDE -->
|
||||
<string name="app_name">AndroidIDE</string>
|
||||
<string name="license_epl">AndroidIDE uses LSP4J in its object code form (i.e. without any modifications) which is licensed under EPL 2.0. If you want us to disclose the source code to you, contact us at: </string>
|
||||
@@ -14,9 +14,9 @@
|
||||
<string name="about_footer_alternate">AndroidIDE v\u2022 %s</string>
|
||||
<string name="about_footer">AndroidIDE %1$s for %2$s</string>
|
||||
<string name="about_subtitle">Simply, an IDE for Android</string>
|
||||
<string name="msg_get_package_failed">Failed to extract package name!</string>
|
||||
<string name="msg_get_package_failed">Failed to extract package name!</string>
|
||||
<string name="msg_share_app">AndroidIDE is an Integrated Development Environment for building Android apps on your Android Smartphone. It supports :\n1. Gradle \n2. OpenJDK 11.0.1.\n3. Advanced Java auto completion\n4. XML Auto Completion \n5. Kotlin Support and much more.\n\nDownload AndroidIDE at https://androidide.com</string>
|
||||
<string name="msg_need_help">If you\'re facing issues while using AndroidIDE or with building Android Apps, you can join the Telegram Group ask for help there.\n\nYou can also send suggesstions on our email.</string>
|
||||
<string name="msg_need_help">If you\'re facing issues while using AndroidIDE or with building Android Apps, you can join the Telegram Group ask for help there.\n\nYou can also send suggesstions on our email.</string>
|
||||
<string name="discuss_amp_help">Discuss & help</string>
|
||||
<string name="title_github">GitHub</string>
|
||||
<string name="need_help">Need Help?</string>
|
||||
@@ -26,14 +26,14 @@
|
||||
<string name="discussions_on_telegram">Discussions on Telegram</string>
|
||||
<string name="msg_empty_view">I have nothing to show you…</string>
|
||||
<string name="btn_terminal">Terminal</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="app_logs">App Logs</string>
|
||||
<string name="ide_logs">IDE Logs</string>
|
||||
<string name="label_splash_image">Splash image</string>
|
||||
<string name="label_splash_image">Splash image</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="get_started">Get started</string>
|
||||
<string name="nothing_here">Nothing here …</string>
|
||||
|
||||
<string name="nothing_here">Nothing here …</string>
|
||||
|
||||
<!-- LSP, Diagnostics & Completions -->
|
||||
<string name="msg_sdk_info_load_failed">Failed to load SDK information</string>
|
||||
<string name="msg_fix_diagnostic">[QuickFix]</string>
|
||||
@@ -54,7 +54,7 @@
|
||||
<string name="menu_comment_line">Comment line</string>
|
||||
<string name="menu_uncomment_line">Uncomment line</string>
|
||||
<string name="view_diags">Diagnostics</string>
|
||||
|
||||
|
||||
<!-- Build Tools Installation -->
|
||||
<string name="title_installation_failed">Installation failed</string>
|
||||
<string name="msg_installation_failed">Installation process terminated with exit code %1$d. Make sure you downloaded the build tools from original sources.\n\nYou could try to clear data of AndroidIDE and install again.</string>
|
||||
@@ -64,18 +64,18 @@
|
||||
<string name="install_build_tools_required_b">Install Build Tools required by AndroidIDE</string>
|
||||
<string name="choose_directory_which_contain">Choose directory which contains build tools.</string>
|
||||
<string name="click_install_button_to_st">Click \'Install\' button to start the installation process.</string>
|
||||
<string name="msg_picked_isnt_dir">Picked file is not a directory!</string>
|
||||
<string name="msg_pick_single_file">Please choose only one directory</string>
|
||||
<string name="msg_file_doesnt_exist">File doesn\'t exist!</string>
|
||||
<string name="msg_pick_files">Please choose files!</string>
|
||||
<string name="msg_picked_isnt_dir">Picked file is not a directory!</string>
|
||||
<string name="msg_pick_single_file">Please choose only one directory</string>
|
||||
<string name="msg_file_doesnt_exist">File doesn\'t exist!</string>
|
||||
<string name="msg_pick_files">Please choose files!</string>
|
||||
<string name="msg_download_instructions">1. Download the build tools from AndroidIDE\'s website.\n2. Move all the archives in a directory.\n3. Pick that directory using the button below.\n4. Click Install.\n5. The installation process will begin.\n\nThe installation process will take about 5–10 minutes depending on your device\'s performance. Please be Patient!</string>
|
||||
<string name="msg_installable_files">Files to be installed\n\n%s</string>
|
||||
<string name="msg_installable_files">Files to be installed\n\n%s</string>
|
||||
<string name="title_restart">Please restart</string>
|
||||
<string name="msg_restart">Installation is finished successfully. Please restart AndroidIDE.</string>
|
||||
<string name="please_wait">Please wait for a moment …</string>
|
||||
<string name="title_device_not_supported">Device Not Supported</string>
|
||||
<string name="msg_device_not_supported">Unfortunately, your device is not supported at the moment. We are sorry for the inconvenience.\n\nSupported CPU ABIs: aarch64 and armeabi-v7a</string>
|
||||
|
||||
<string name="msg_restart">Installation is finished successfully. Please restart AndroidIDE.</string>
|
||||
<string name="please_wait">Please wait for a moment …</string>
|
||||
<string name="title_device_not_supported">Device Not Supported</string>
|
||||
<string name="msg_device_not_supported">Unfortunately, your device is not supported at the moment. We are sorry for the inconvenience.\n\nSupported CPU ABIs: aarch64 and armeabi-v7a</string>
|
||||
|
||||
<!-- Project Builder -->
|
||||
<string name="lint">Lint</string>
|
||||
<string name="lint_debug">lintDebug</string>
|
||||
@@ -93,27 +93,27 @@
|
||||
<string name="quick_run_debug">Quick run</string>
|
||||
<string name="msg_sync_needed">Gradle files have changed. Please rebuild your project to sync dependencies and configurations.</string>
|
||||
<string name="msg_task_begin">========== [%s] TASK_BEGIN: %s ==========</string>
|
||||
<string name="preparing">Preparing</string>
|
||||
<string name="preparing_first">Preparing. First build may take up to 10–15 minutes!</string>
|
||||
<string name="preparing">Preparing</string>
|
||||
<string name="preparing_first">Preparing. First build may take up to 10–15 minutes!</string>
|
||||
<string name="msg_gradle_terminated">Gradle process exited with exit code %1$d</string>
|
||||
<string name="msg_gradlew_installation_failed">Failed to install Gradle Wrapper: %s</string>
|
||||
<string name="msg_installing_gradlew">Gradle Wrapper is not available!\nInstalling default one. Gradle v7.3 will be downloaded if necessary.</string>
|
||||
<string name="msg_getting_daemom_status">Getting Daemon status, please wait…</string>
|
||||
<string name="msg_daemons_stopped">Gradle Daemons Stopped</string>
|
||||
<string name="msg_daemons_stopped">Gradle Daemons Stopped</string>
|
||||
<string name="gradle_daemon_status">Gradle daemon status</string>
|
||||
<string name="msg_service_started">Service Started</string>
|
||||
<string name="msg_starting_completion">Starting services</string>
|
||||
<string name="msg_starting_completion_failed">Failed to start Completion Services</string>
|
||||
<string name="msg_starting_daemon">Starting a Gradle daemon</string>
|
||||
<string name="msg_starting_completion">Starting services</string>
|
||||
<string name="msg_starting_completion_failed">Failed to start Completion Services</string>
|
||||
<string name="msg_starting_daemon">Starting a Gradle daemon</string>
|
||||
<string name="title_install_apks">Install APK(s)</string>
|
||||
<string name="title_clear_output">Clear output</string>
|
||||
<string name="install">Install</string>
|
||||
<string name="run">Run</string>
|
||||
<string name="gradle">Gradle</string>
|
||||
<string name="title_first_build">First Build</string>
|
||||
<string name="msg_first_build">This is the first time build after you installed AndroidIDE. First build usually takes time as Gradle downloads all dependencies and plugins. This process may take about 10–15 minutes. But this totally depends on your network connection.\n\nPlease be patient …</string>
|
||||
<string name="compiling">Compiling</string>
|
||||
|
||||
<string name="title_first_build">First Build</string>
|
||||
<string name="msg_first_build">This is the first time build after you installed AndroidIDE. First build usually takes time as Gradle downloads all dependencies and plugins. This process may take about 10–15 minutes. But this totally depends on your network connection.\n\nPlease be patient …</string>
|
||||
<string name="compiling">Compiling</string>
|
||||
|
||||
<!-- Project -->
|
||||
<string name="create_project">Create project</string>
|
||||
<string name="minimum_sdk">Minimum SDK</string>
|
||||
@@ -121,7 +121,7 @@
|
||||
<string name="new_project">New project</string>
|
||||
<string name="package_name">Package name</string>
|
||||
<string name="project_app_name">App name</string>
|
||||
<string name="invalid_values">Invalid values</string>
|
||||
<string name="invalid_values">Invalid values</string>
|
||||
<string name="msg_no_projects">Looks like you haven\'t created any projects yet.</string>
|
||||
<string name="msg_create_new_project_greeting">Start your new awesome project!</string>
|
||||
<string name="title_confirm_open_project">Open last project?</string>
|
||||
@@ -135,7 +135,7 @@
|
||||
<string name="msg_opening_project">Opening project…</string>
|
||||
<string name="msg_invalid_project">Picked directory is not an Android project</string>
|
||||
<string name="msg_project_deleted">Project deleted</string>
|
||||
<string name="msg_project_delete_failed">Failed to delete project!</string>
|
||||
<string name="msg_project_delete_failed">Failed to delete project!</string>
|
||||
<string name="menu_project_info">Project info</string>
|
||||
<string name="header_module_info">Module info</string>
|
||||
<string name="msg_module_count">Modules : %d</string>
|
||||
@@ -147,15 +147,15 @@
|
||||
<string name="title_confirm_project_close">Close project</string>
|
||||
<string name="msg_confirm_project_close">Are you sure you want to close this project? All started Gradle daemons will be stopped after this project is closed.</string>
|
||||
<string name="project_exists">A project with same name already exists!</string>
|
||||
|
||||
|
||||
<!-- Templates -->
|
||||
<string name="template_basic">Basic Project</string>
|
||||
<string name="template_description_basic">A basic project with AppCompat Toolbar and a Floating Action Button</string>
|
||||
<string name="template_description_empty">An empty project with default toolbar. Suitable when you want to do all the basic things yourself.</string>
|
||||
<string name="template_description_navigation_drawer">Project with AppCompat Toolbar, DrawerLayout and NavigationView</string>
|
||||
<string name="template_empty">Empty project</string>
|
||||
<string name="template_navigation_drawer">Navigation drawer project</string>
|
||||
|
||||
<string name="template_navigation_drawer">Navigation drawer project</string>
|
||||
|
||||
<!-- Files -->
|
||||
<string name="save">Save</string>
|
||||
<string name="show_files">Files</string>
|
||||
@@ -171,67 +171,67 @@
|
||||
<string name="msg_searching_project">Finding in project, please wait…</string>
|
||||
<string name="view_search_results">Search results</string>
|
||||
<string name="copying_files">Copying files</string>
|
||||
<string name="writing_files">Writing files</string>
|
||||
<string name="copying_assets">Copying assets</string>
|
||||
<string name="failed_create_project_dir">Failed to create project dir!</string>
|
||||
<string name="failed_write_file">Failed to write file: %s</string>
|
||||
<string name="asset_copy_failed">Failed to copy template to storage!</string>
|
||||
<string name="cannot_create_temp">Failed to create temporary project directory!</string>
|
||||
<string name="project_created_successfully">Project created successfully!</string>
|
||||
<string name="msg_begin_project_write">Starting writing process</string>
|
||||
<string name="msg_folder_creation_failed">Failed to create folder!</string>
|
||||
<string name="msg_file_creation_failed">Failed to create file!</string>
|
||||
<string name="msg_folder_created">Folder created successfully!</string>
|
||||
<string name="msg_file_created">File created successfully!</string>
|
||||
<string name="msg_folder_exists">Folder already exists!</string>
|
||||
<string name="msg_file_exists">File already exists!</string>
|
||||
<string name="msg_invalid_name">Invalid Name!</string>
|
||||
<string name="text_create">Create</string>
|
||||
<string name="msg_can_contain_slashes">If the path contains File separator (\'/\'), then the required (parent) directories will be created if they don\'t exist.</string>
|
||||
<string name="folder_name">Folder Name</string>
|
||||
<string name="file_name">File Name</string>
|
||||
<string name="new_name">New name</string>
|
||||
<string name="new_file">New file</string>
|
||||
<string name="new_java_class">New Java class</string>
|
||||
<string name="new_xml_resource">New XML resource</string>
|
||||
<string name="new_folder">New folder</string>
|
||||
<string name="writing_files">Writing files</string>
|
||||
<string name="copying_assets">Copying assets</string>
|
||||
<string name="failed_create_project_dir">Failed to create project dir!</string>
|
||||
<string name="failed_write_file">Failed to write file: %s</string>
|
||||
<string name="asset_copy_failed">Failed to copy template to storage!</string>
|
||||
<string name="cannot_create_temp">Failed to create temporary project directory!</string>
|
||||
<string name="project_created_successfully">Project created successfully!</string>
|
||||
<string name="msg_begin_project_write">Starting writing process</string>
|
||||
<string name="msg_folder_creation_failed">Failed to create folder!</string>
|
||||
<string name="msg_file_creation_failed">Failed to create file!</string>
|
||||
<string name="msg_folder_created">Folder created successfully!</string>
|
||||
<string name="msg_file_created">File created successfully!</string>
|
||||
<string name="msg_folder_exists">Folder already exists!</string>
|
||||
<string name="msg_file_exists">File already exists!</string>
|
||||
<string name="msg_invalid_name">Invalid Name!</string>
|
||||
<string name="text_create">Create</string>
|
||||
<string name="msg_can_contain_slashes">If the path contains File separator (\'/\'), then the required (parent) directories will be created if they don\'t exist.</string>
|
||||
<string name="folder_name">Folder Name</string>
|
||||
<string name="file_name">File Name</string>
|
||||
<string name="new_name">New name</string>
|
||||
<string name="new_file">New file</string>
|
||||
<string name="new_java_class">New Java class</string>
|
||||
<string name="new_xml_resource">New XML resource</string>
|
||||
<string name="new_folder">New folder</string>
|
||||
<string name="title_confirm_delete">Confirm delete</string>
|
||||
<string name="msg_confirm_delete">Are you sure you want to delete:\n%s?</string>
|
||||
<string name="copied">Copied successfully!</string>
|
||||
<string name="msg_rename_file">Enter new name for file/folder.</string>
|
||||
<string name="renamed">Renamed successfully!</string>
|
||||
<string name="rename_failed">Unable to rename file!</string>
|
||||
<string name="deleted">Deleted successfully!</string>
|
||||
<string name="delete_failed">Unable to delete file!</string>
|
||||
<string name="copy_path">Copy path</string>
|
||||
<string name="rename_file">Rename</string>
|
||||
<string name="delete_file">Delete</string>
|
||||
<string name="file_options">File options</string>
|
||||
<string name="action_closeAll">Close all</string>
|
||||
<string name="action_closeOthers">Close others</string>
|
||||
<string name="action_closeThis">Close this</string>
|
||||
<string name="msg_confirm_delete">Are you sure you want to delete:\n%s?</string>
|
||||
<string name="copied">Copied successfully!</string>
|
||||
<string name="msg_rename_file">Enter new name for file/folder.</string>
|
||||
<string name="renamed">Renamed successfully!</string>
|
||||
<string name="rename_failed">Unable to rename file!</string>
|
||||
<string name="deleted">Deleted successfully!</string>
|
||||
<string name="delete_failed">Unable to delete file!</string>
|
||||
<string name="copy_path">Copy path</string>
|
||||
<string name="rename_file">Rename</string>
|
||||
<string name="delete_file">Delete</string>
|
||||
<string name="file_options">File options</string>
|
||||
<string name="action_closeAll">Close all</string>
|
||||
<string name="action_closeOthers">Close others</string>
|
||||
<string name="action_closeThis">Close this</string>
|
||||
<string name="all_saved">All files saved!</string>
|
||||
<string name="msg_newfile_dest">Destination: %s/</string>
|
||||
<string name="restype_drawable">Drawable</string>
|
||||
<string name="restype_layout">Layout</string>
|
||||
<string name="restype_menu">Menu</string>
|
||||
<string name="restype_other">Other</string>
|
||||
<string name="classtype_class">Class</string>
|
||||
<string name="restype_drawable">Drawable</string>
|
||||
<string name="restype_layout">Layout</string>
|
||||
<string name="restype_menu">Menu</string>
|
||||
<string name="restype_other">Other</string>
|
||||
<string name="classtype_class">Class</string>
|
||||
<string name="classtype_activity">Activity</string>
|
||||
<string name="classtype_interface">Interface</string>
|
||||
<string name="classtype_enum">Enum</string>
|
||||
<string name="msg_checking_storage_permissions">Checking storage permissions</string>
|
||||
<string name="msg_failed_list_files">Failed to list project files!</string>
|
||||
<string name="msg_failed_save">Failed to save files!</string>
|
||||
<string name="msg_storage_denied">Can\'t proceed without storage permissions</string>
|
||||
<string name="msg_storage_granted">Storage permissions granted!</string>
|
||||
|
||||
<string name="msg_failed_list_files">Failed to list project files!</string>
|
||||
<string name="msg_failed_save">Failed to save files!</string>
|
||||
<string name="msg_storage_denied">Can\'t proceed without storage permissions</string>
|
||||
<string name="msg_storage_granted">Storage permissions granted!</string>
|
||||
|
||||
<!-- Code Editor -->
|
||||
<string name="undo">Undo</string>
|
||||
<string name="redo">Redo</string>
|
||||
<item name="paste" type="string">Paste</item>
|
||||
<item name="copy" type="string" tools:override="true">Copy</item>
|
||||
<item name="selectAll" type="string" formatted="true">Select All</item>
|
||||
<item name="selectAll" formatted="true" type="string">Select All</item>
|
||||
<item name="cut" type="string">Cut</item>
|
||||
<item name="last" type="string">Last</item>
|
||||
<item name="next" type="string">Next</item>
|
||||
@@ -239,8 +239,8 @@
|
||||
<item name="replaceAll" type="string">Replace all</item>
|
||||
<item name="replacement" type="string">Replacement</item>
|
||||
<item name="text_to_search" type="string">Text to search</item>
|
||||
<item name="more" type="string" translatable="false" >More</item>
|
||||
|
||||
<item name="more" translatable="false" type="string">More</item>
|
||||
|
||||
<!-- Preferences -->
|
||||
<string name="title_change_text_size">Editor font size</string>
|
||||
<string name="idepref_about_title">About AndroidIDE</string>
|
||||
@@ -266,12 +266,12 @@
|
||||
<string name="title_tab_size">Tab size</string>
|
||||
<string name="msg_tab_size">Specify number of spaces for TAB</string>
|
||||
<string name="msg_preferences">Preferences</string>
|
||||
<string name="msg_failed_get_changelog">Failed to read changelog!</string>
|
||||
<string name="pref_changelog">Changelog</string>
|
||||
<string name="msg_editor_font_size">Please choose default font size of editor :</string>
|
||||
<string name="msg_clear_cache">This will delete caches directory created by Gradle. If you delete it, the next build may take a bit longer than normal as Gradle will download required files again.\nIMPORTANT: This will also delete AAPT2. You will need to reinstall it otherwise you\'ll end up with a build failure.\n\nAre you sure you want to delete caches?</string>
|
||||
|
||||
|
||||
<string name="msg_failed_get_changelog">Failed to read changelog!</string>
|
||||
<string name="pref_changelog">Changelog</string>
|
||||
<string name="msg_editor_font_size">Please choose default font size of editor :</string>
|
||||
<string name="msg_clear_cache">This will delete caches directory created by Gradle. If you delete it, the next build may take a bit longer than normal as Gradle will download required files again.\nIMPORTANT: This will also delete AAPT2. You will need to reinstall it otherwise you\'ll end up with a build failure.\n\nAre you sure you want to delete caches?</string>
|
||||
|
||||
|
||||
<!-- Error Messages used while Logging -->
|
||||
<string name="err_installation">Installation error</string>
|
||||
<string name="err_completion">Completion error</string>
|
||||
@@ -340,5 +340,9 @@
|
||||
<string name="msg_code_generation_failed">Failed to generate XML code. Would you like to exit anyway?</string>
|
||||
<string name="msg_invalid_designer_result">UI Designer returned invalid result</string>
|
||||
<string name="msg_swipe_up">Swipe up for build output, logs and more.</string>
|
||||
<string name="msg_ide_crashed">AndroidIDE crashed</string>
|
||||
<string name="msg_report_crash">Please open an issue on github with the following stacktrace :</string>
|
||||
<string name="msg_crash_report_hint">Click on the button below to copy log and open issues page.</string>
|
||||
<string name="msg_copy_report_action">Copy and report</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -51,7 +51,6 @@ public abstract class BaseApplication extends MultiDexApplication {
|
||||
private StudioUtils mUtils;
|
||||
private PreferenceManager mPrefsManager;
|
||||
private NotificationManager mNotificationManager;
|
||||
private Thread.UncaughtExceptionHandler uncaughtExceptionHandler;
|
||||
|
||||
public static final long BUSYBOX_VERSION = 1;
|
||||
public static final String TAG = "StudioApp";
|
||||
@@ -65,9 +64,7 @@ public abstract class BaseApplication extends MultiDexApplication {
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
this.instance = this;
|
||||
this.uncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> handleCrash(thread, ex));
|
||||
instance = this;
|
||||
super.onCreate();
|
||||
|
||||
mPrefsManager = new PreferenceManager(this);
|
||||
@@ -239,21 +236,6 @@ public abstract class BaseApplication extends MultiDexApplication {
|
||||
throw new UnsupportedOperationException ("Device not supported");
|
||||
}
|
||||
|
||||
private void handleCrash(Thread thread, Throwable th) {
|
||||
writeException(th);
|
||||
|
||||
if(this.uncaughtExceptionHandler != null) {
|
||||
this.uncaughtExceptionHandler.uncaughtException(thread, th);
|
||||
}
|
||||
|
||||
// TODO Show exception in another activity
|
||||
try {
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
} catch (Throwable ignored) {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
public String getAssetsDataFile() {
|
||||
return ASSETS_DATA_DIR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user