Adding AcomPat Support Library

45 views
Skip to first unread message

Abdul Basid

unread,
Feb 10, 2019, 9:01:56 AM2/10/19
to AIDE - Android Java IDE
Hello everybody !

It is Abdul, a chocolate (but) white-hearted boy from Africa. I have been working with AIDE IDE compiler and I do appreciate its uniqueness and its developers effort and say "Thanks for your works". And eventually hope AIDE will remain on top of the present and future compilers, ever.

Well, then... I have come up to this group with a serious bug (concerning me), and that is when I add a support library (for instead, Acompat v7, v4, or design), the app shows no error at all, but when I installed and tried to open it (it doesn't, it crashes) saying
"Unfortunately Myapp has stopped"
I did all my best to figure out the case, bug or problem but I couldn't.

Any help please..... !!!

Thomas Schmid

unread,
Feb 22, 2019, 10:43:34 AM2/22/19
to AIDE - Android Java IDE
Install this: https://play.google.com/store/apps/details?id=com.vicky.aidehelper

Create a sample with it, and then have a look at samole source code.

AIDE does work with all this libs without any problem

Abdul Basid

unread,
Apr 14, 2019, 10:20:19 PM4/14/19
to AIDE - Android Java IDE
Tried but did not avail !

Thank you for replay.

Kubi Benjamin

unread,
Apr 17, 2019, 1:57:19 PM4/17/19
to AIDE - Android Java IDE

Kubi Benjamin

unread,
Apr 17, 2019, 1:57:19 PM4/17/19
to AIDE - Android Java IDE
@Abdul Basid show me your build.gradle file content and yeah there is a fix

Lucas Rangel Lopes

unread,
Apr 18, 2019, 9:53:44 PM4/18/19
to AIDE - Android Java IDE
Haaan

Abdul Basid

unread,
Jun 24, 2019, 8:56:19 AM6/24/19
to AIDE - Android Java IDE

Let you see the whole code!

First build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.+'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
mavenCenteral()
}
}

Second build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.+"

defaultConfig {
applicationId "com.mycompany.myapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
api ('android.arch.core:runtime:+')
{
force = true
}
api 'com.android.support:appcompat-v7:27.+'
api fileTree(dir: 'libs', include: ['*.jar'])
}

MainActivity.java

package com.mycompany.myapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}

res/layout/main.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">

<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</LinearLayout>

res/values/styles.xml

AND (are the same)

res/values-v21/styles.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
</style>
</resources>

-------------------------------------------

No error been highlighted but yet the app crashes. Where I missed ?

Thanks

Ian James Anonas

unread,
Jun 30, 2019, 1:01:32 PM6/30/19
to andro...@googlegroups.com
I already solved this. The problem is on the "Theme" which is written on the styles.xml in the 'values' folder. Change that to AppCompat theme not the Default theme. The reason for that is because in the activity_main.java you extended the AppCompatActivity and therefore the activity theme must also be an AppCompat theme.
--
--
AIDE - Android Java IDE mailing list
andro...@googlegroups.com
http://groups.google.com/group/android-ide?hl=en

---
You received this message because you are subscribed to the Google Groups "AIDE - Android Java IDE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ide/f5922538-3887-4e05-b55b-c70bd949402d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages